From 657d443a3edcc9c3a126d9174bedbbbb496f2eff Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 21 Sep 2024 02:24:30 +0200 Subject: [PATCH] fix --- backend/open_webui/apps/socket/main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/apps/socket/main.py b/backend/open_webui/apps/socket/main.py index 8355cbcd8..c353c8e6f 100644 --- a/backend/open_webui/apps/socket/main.py +++ b/backend/open_webui/apps/socket/main.py @@ -12,7 +12,16 @@ from open_webui.utils.utils import decode_token if WEBSOCKET_MANAGER == "redis": mgr = socketio.AsyncRedisManager(WEBSOCKET_REDIS_URL) - sio = socketio.AsyncServer(client_manager=mgr) + sio = socketio.AsyncServer( + cors_allowed_origins=[], + async_mode="asgi", + transports=( + ["polling", "websocket"] if ENABLE_WEBSOCKET_SUPPORT else ["polling"] + ), + allow_upgrades=ENABLE_WEBSOCKET_SUPPORT, + always_connect=True, + client_manager=mgr, + ) else: sio = socketio.AsyncServer( cors_allowed_origins=[],