-
Hi I have YARP working but what I am hoping to do is capture websocket response and request data so I can use it to update values in another place. I tried the middleware but can't seem to get it to see whats being sent and received via the websocket... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
YARP will forward WebSocket traffic as-is, that is, we won't try to buffer/parse out and reframe individual messages. If you want access to the raw WebSocket connection, you'd have to intercept the streams created when the request is upgraded to WS. |
Beta Was this translation helpful? Give feedback.
YARP will forward WebSocket traffic as-is, that is, we won't try to buffer/parse out and reframe individual messages.
If you want access to the raw WebSocket connection, you'd have to intercept the streams created when the request is upgraded to WS.
Note that this is only useful if you're willing to manually parse the WebSocket protocol to detect frames.
An example of doing something like that is here:
https://github.com/microsoft/reverse-proxy/blob/main/src/ReverseProxy/WebSocketsTelemetry/WebSocketsTelemetryMiddleware.cs