Describe the bug
In
|
headers=client_request_headers, |
, headers are copied from the upstream websocket connection to the
httpx_ws call. This can lead to a desync in the negotiated options. For example, passing through
sec-websocket-extensions: permessage-deflate from upstream to downstream may cause the downstream host to compress websocket messages, which
httpx_ws will not expect and fail.
Probably all sec-websocket* headers should not be passed to downstream.
Observed on fastapi-proxy-lib 0.2.0
Describe the bug
In
fastapi-proxy-lib/src/fastapi_proxy_lib/core/websocket.py
Line 536 in 64a7be4
httpx_wscall. This can lead to a desync in the negotiated options. For example, passing throughsec-websocket-extensions: permessage-deflatefrom upstream to downstream may cause the downstream host to compress websocket messages, whichhttpx_wswill not expect and fail.Probably all
sec-websocket*headers should not be passed to downstream.Observed on fastapi-proxy-lib 0.2.0