Skip to content
Discussion options

You must be logged in to vote

The browser native WebSocket automatically sends cookies alongside the upgrade request. There are no credentials configuration options when instantiating a WebSocket. Also see #257 (comment).

Furthermore, there's no way you can set custom headers in the browser's WebSocket.

Also beware that httpOnly cookies cant be accessed from JavaScript.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@4lp
Comment options

Answer selected by enisdenjo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #529 on January 16, 2024 19:02.