sockjs / sockjs-erlang

WebSocket emulation - Erlang server
http://sockjs.org
Other
266 stars 120 forks source link

Cookies. #16

Closed egobrain closed 12 years ago

egobrain commented 12 years ago

Need help. Is there way to get cookies from request. I'm using cowboy and want to authorize user before connect him. Is there any way to solve my problem ?

majek commented 12 years ago

@Egobrain Due to the nature of SockJS (especially the iframe-based transports), Cookie and Origin headers may be very misleading. Using them for authorization will inevitably lead to security issues. Further reading:

Please consider sending a unique authorization token over SockJS.

Why do you need to authorize before the connection is established?

egobrain commented 12 years ago

I'm developing app where only authorized users can access server. I don want to handle unauthorized connection.

Marek Majkowski
reply@reply.github.com
:

@Egobrain Due to the nature of SockJS (especially the iframe-based
transports), Cookie and Origin header may be very misleading. Using them
for authorization will inevitably lead to security issues. Further
reading:

Please consider sending a unique authorization token over SockJS.

Why do you need to authorize before the connection is established?


Reply to this email directly or view it on GitHub:

https://github.com/sockjs/sockjs-erlang/issues/16#issuecomment-4714509

majek commented 12 years ago

Okay, that's what I do:

Will that work for you?

egobrain commented 12 years ago

Yes. I can do so... Thank you.