node-http-proxy icon indicating copy to clipboard operation
node-http-proxy copied to clipboard

Modify WebSocket messages

Open carl-vbn opened this issue 5 years ago • 2 comments
trafficstars

While I've successfully managed to proxy WebSocket messages, and even log the data by listening to the 'data' event, I haven't found a way to modify the sent data. Is it possible to add a "hook" between the receiving and sending of the WebSocket messages from the client to the target and vice-versa?

It would be great if there was an event that would be called every time a new chunk of live websocket data comes through the proxy and that would allow me to override it.

Please let me know if there is already a way to achieve this. Thank you.

carl-vbn avatar Jul 12 '20 15:07 carl-vbn