-
Notifications
You must be signed in to change notification settings - Fork 198
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
does not support http headers #172
Comments
This should probably be closed. It appears that WebSockets doesn't support adding headers to the request: https://stackoverflow.com/a/58451279/6365919 Looks like it works in my react-native project but not in the web implementation. Work around I've used is to add the bearer token as a parameter to the URL and then implement a custom security lookup in the backend based on the presence of the token in the URL. Hope this helps. ex: wss://myserver.com/sock?t={bearer token} |
@johnbonds Since we have a Ref: https://github.com/websockets/ws/blob/master/lib/websocket.js#L720 |
Web implementation of WebSockets doesn't support headers, it supports Sec-WebSocket-Protocol Ref :https://stackoverflow.com/questions/4361173/http-headers-in-websockets-client-api |
That is only for the browser implementation of websockets, however the nodejs websocket use case (using the |
websocket class support headers out of the box
the options supported here are
The text was updated successfully, but these errors were encountered: