Closed mathieulaporte closed 2 years ago
Hello,
I discovered that the X-Forwarded-For header was missing when handshaking for a websocket connection. This is because the headers to identify a websocket handshake are removed here: https://github.com/vulcand/oxy/blob/master/forward/fwd.go#L507.
This has the effect that "IsWebsocketRequest" (https://github.com/vulcand/oxy/blob/master/forward/fwd.go#L570) returns false here https://github.com/vulcand/oxy/blob/master/forward/rewrite.go#L31.
The easiest way to fix this bug would be to leave the headers but I don't know why they were removed.
Considering refactoring #229, the specific code for WebSocket has been removed.
Hello,
I discovered that the X-Forwarded-For header was missing when handshaking for a websocket connection. This is because the headers to identify a websocket handshake are removed here: https://github.com/vulcand/oxy/blob/master/forward/fwd.go#L507.
This has the effect that "IsWebsocketRequest" (https://github.com/vulcand/oxy/blob/master/forward/fwd.go#L570) returns false here https://github.com/vulcand/oxy/blob/master/forward/rewrite.go#L31.
The easiest way to fix this bug would be to leave the headers but I don't know why they were removed.