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

Event to modify outgoing web socket handshake? #882

Closed
andrewpmartinez opened this issue Sep 18, 2015 · 1 comment
Closed

Event to modify outgoing web socket handshake? #882

andrewpmartinez opened this issue Sep 18, 2015 · 1 comment

Comments

@andrewpmartinez
Copy link

I have been working with web sockets in node-http-proxy and I didn't see any path that would allow one to modify the HTTP headers of the proxy request used to conduct the web socket handshake.

The web socket protocol allows the server to fail the connection and make application level decisions based on any other part(s) of the HTTP request (i.e. pre-handshake-response authentication that is not supplied from the incoming request in my case).

It would seem that emitting an event named 'proxyWsReq' with the proxyReq as arguments would be a valid use case. This could be done right before proxyReq.end() is called in the ws-incoming.js passes.

andrewpmartinez pushed a commit to andrewpmartinez/node-http-proxy that referenced this issue Sep 18, 2015
Adds a proxyWsReq event that can be used to modify the outgoing
websocket handshake.
andrewpmartinez added a commit to andrewpmartinez/node-http-proxy that referenced this issue Sep 19, 2015
Fixes style issues w/ original http-party#882 additions.
@indexzero
Copy link
Contributor

Fixed in #897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants