1

While creating WebSocket on client side, browser also sends cookies with Headers. Is there are a way to disable this behavior.

I read WebSocket documentation on Mozilla Dev Net (https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) but couldn't find any documentation regrading this.

Suyash Mohan
  • 300
  • 3
  • 8

1 Answers1

1

No, there is no way to do that.

Cookies won't be send if the websocket server is in another domain. Or if they are in another subdomain but the cookie is not allowed in subdomains.

How do browser cookie domains work?

Community
  • 1
  • 1
vtortola
  • 32,045
  • 25
  • 144
  • 246