fix(ws): use websockets v17 additional_headers and filter Origin in WebSocket proxy bridge

This commit is contained in:
bolbol
2026-08-20 15:28:45 +01:00
parent 23168a13e8
commit 3fadb884f0
+3 -2
View File
@@ -29,7 +29,8 @@ WS_HOP_BY_HOP_HEADERS = {
"sec-websocket-version",
"sec-websocket-extensions",
"sec-websocket-accept",
"host"
"host",
"origin"
}
_http_transport: Optional[httpx.AsyncHTTPTransport] = None
@@ -206,7 +207,7 @@ async def proxy_websocket(
try:
async with websockets.connect(
upstream_url,
extra_headers=upstream_headers,
additional_headers=upstream_headers,
subprotocols=subprotocols,
ping_interval=20,
ping_timeout=20,