Skip to content

Propagate request context into sockjs session#68

Open
eklitzke wants to merge 1 commit into
igm:masterfrom
eklitzke:context
Open

Propagate request context into sockjs session#68
eklitzke wants to merge 1 commit into
igm:masterfrom
eklitzke:context

Conversation

@eklitzke

@eklitzke eklitzke commented Oct 9, 2018

Copy link
Copy Markdown

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
Copy Markdown

Coverage Status

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

@igm

igm commented Oct 12, 2018

Copy link
Copy Markdown
Owner

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