Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate request context into sockjs session #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eklitzke
Copy link

@eklitzke eklitzke commented Oct 9, 2018

This exposes the HTTP request context via the Session interface, which I would like to use in my code as I populate fields in the originating HTTP request context that I'd like to add to use elsewhere in my sockjs session.

The other way to do this would be to not add any additional methods to the struct, and instead make the Request method be part of the Session interface.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.06%) to 93.579% when pulling 3daf71c on eklitzke:context into 04b4253 on igm:master.

@igm
Copy link
Owner

igm commented Oct 12, 2018

Thank you for the PR @eklitzke . I'm a little hesitant to merge it as it changes contract of session interface and causes incompatible change in API. And there's currently a way to get context from session via session.Request().Context(), your solution is a shortcut for the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants