Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Pusher method/options to add Http headers for web-socket connection establishment #273

Open
vrjgamer opened this issue Jul 15, 2020 · 0 comments

Comments

@vrjgamer
Copy link

vrjgamer commented 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 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

@vrjgamer 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants