1

I found that the javascript websocket API does not support adding custom headers, Is there any specific reason for this. In addition, wanted to know whether is there any javascript libraries that could help to set authorization headers.

After going through some implementation, I found most of the suggestion were to use authorization parameters(token) as query parameter. Therefore I wanted to know whether wont this cause any security vulnerabilities?

exterminator
  • 250
  • 4
  • 11
  • JWT is a really good solution, in both cases if you don't have a secure connection you will have a security issues. – Hosar Nov 28 '16 at 03:30
  • Does this answer your question? [HTTP headers in Websockets client API](https://stackoverflow.com/questions/4361173/http-headers-in-websockets-client-api) – Nicolas Martinez Jul 14 '20 at 18:21

1 Answers1

0

Why don't you use an online WebSocket server like https://socketsbay.com It's already encrypted (using SSL) and you don't need a token in the header.

Daniel
  • 789
  • 2
  • 9
  • 23