Skip to content

Event to modify outgoing web socket handshake? #882

@andrewpmartinez

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions