Event to modify outgoing web socket handshake?
Created by: andrewpmartinez
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.