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

Websocket origin check inconsistent #92

Closed
RJ opened this issue Jan 20, 2012 · 1 comment
Closed

Websocket origin check inconsistent #92

RJ opened this issue Jan 20, 2012 · 1 comment

Comments

@RJ
Copy link
Contributor

RJ commented Jan 20, 2012

Looks like misultin_ws:get(origin) only uses the "Origin" header, which is correct for newer versions of the websocket protocol.

Older versions still rely on "Sec-Websocket-Origin"

I'm doing origin lookups like this in my code, because not all clients are sending an Origin: header yet:

case WS:get(origin) of
false ->
Headers = WS:get(headers),
proplists:get_value("Sec-Websocket-Origin", Headers, false);
Origin -> Origin
end

Would probably make sense for misultin_ws:get(origin) to take care of that.

@ostinelli
Copy link
Owner

fixed 33ab595

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

No branches or pull requests

2 participants