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 need to send "origin" header to the server while I establish connection to it. But I couldn’t find any method or pusher options to do so. And the httpAuthorizer only sends headers when a private subscription is performed. As I investigated the Webscoket implementation for this library, I see that there is a WebsocketClient Constructor which takes in httpHeaders as an optional parameter which can solve my issue.
Any improvements you suggest
An additional constructor can be added to WebSocketClientWrapper (which extends the WebsocketClient) which takes a map of httpHeaders as a parameter and then update the super call to send in the httpHeaders.
With this change, a new PusherOptions method can be added which can take httpHeaders as a parameter and supply it up the chain.
CC @pusher/mobile
The text was updated successfully, but these errors were encountered:
vrjgamer
changed the title
No Pusher method/Constructor to add Http headers for web-socket connection establishment
No Pusher method/options to add Http headers for web-socket connection establishment
Jul 15, 2020
What is the issue?
I need to send "origin" header to the server while I establish connection to it. But I couldn’t find any method or pusher options to do so. And the httpAuthorizer only sends headers when a private subscription is performed. As I investigated the
Webscoket
implementation for this library, I see that there is a WebsocketClient Constructor which takes in httpHeaders as an optional parameter which can solve my issue.Any improvements you suggest
An additional constructor can be added to
WebSocketClientWrapper
(which extends theWebsocketClient
) which takes a map ofhttpHeaders
as a parameter and then update the super call to send in the httpHeaders.With this change, a new
PusherOptions
method can be added which can takehttpHeaders
as a parameter and supply it up the chain.CC @pusher/mobile
The text was updated successfully, but these errors were encountered: