ClusterWS / ClusterWS-Client-JS

:fire: JavaScript Client for ClusterWS - lightweight, fast and powerful framework for building scalable WebSocket applications in Node.js.
MIT License
115 stars 10 forks source link

Custom Headers #36

Closed carmas123 closed 6 years ago

carmas123 commented 6 years ago

Submitting

Details

Please can you explain me how I can add a custom header to pass an authorization token into header?

goriunov commented 6 years ago

Unfortunately browser WebSocket does not support custom headers, check out this one https://github.com/websockets/ws/issues/467

carmas123 commented 6 years ago

Ok I found a solution. Save the header data into cookie and it will be passed to the Ws headers. Regards

shwarcu commented 4 years ago

@carmas123 could you please share how to exactly do this?

carmas123 commented 4 years ago

Sorry man but I solved the problem some years ago and I don't remember how I do that. However now I use other framework and I migrate all to Socket.Io