websocket
websocket copied to clipboard
Support Authorization header
I am trying to pass my user credentials to my websocket server using the url ws://username:[email protected]. Unfortunately on the server side I don't see any Authorization header.
I initially thought about an old chromium issue but I have the exact same issue on FIrefox.
It would be very nice to support HTTP basic auth during upgrade request or even better, allow us to pass additional headers (maybe in the low level API).
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
This seems to be unsolvable, as the JS API itself doesn't support setting any headers:
https://stackoverflow.com/questions/22383089/is-it-possible-to-use-bearer-authentication-for-websocket-upgrade-requests/26123316#26123316