You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see any option to add custom headers to the WS connection. I know this may not be used for browser based implementations of websocket connections, but many server-side client libs need to provide an Authorization header to connect to a websocket. Is this something you could see using on this project? Thanks!
The text was updated successfully, but these errors were encountered:
Unfortunately no, sorry. The browser WebSocket does not allow this behavior so there's no means/purpose in Sockette adding support for it. You can sorta go about this on the browser via protocols, but even so, that's writing into the Sec-WebSocket-Protocol header.
Not certain, but another option is to append a token to the url you're connecting to; ws://localhost:3000?token=abc-123.
That said, if you're using Sockette in the server (with a custom WebSocket global), each event handler receives the current ws instance as its event target. Whatever server implementation you are using will be available inside those handlers.
I don't see any option to add custom headers to the WS connection. I know this may not be used for browser based implementations of websocket connections, but many server-side client libs need to provide an Authorization header to connect to a websocket. Is this something you could see using on this project? Thanks!
The text was updated successfully, but these errors were encountered: