From 3fadb884f00ecc4b79f1ec19c4ff8c51c5d72032 Mon Sep 17 00:00:00 2001 From: bolbol Date: Thu, 20 Aug 2026 15:28:45 +0100 Subject: [PATCH] fix(ws): use websockets v17 additional_headers and filter Origin in WebSocket proxy bridge --- app/proxy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/proxy.py b/app/proxy.py index 3dc5a35..c9302f4 100644 --- a/app/proxy.py +++ b/app/proxy.py @@ -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,