From c9f628e50ef3c53871f1a63e725763a0a26f832d Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:53:41 +0200 Subject: [PATCH] fix(webui): explicitly specify websocket protocol apparently some browsers need this to establish a connection, tho I failed to repro it --- static/webui/script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/webui/script.js b/static/webui/script.js index 1625216c..57da8a51 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -28,7 +28,8 @@ const sendAuth = isRegister => { }; function openWebSocket() { - window.ws = new WebSocket("/custom/ws"); + const wsProto = location.protocol === "https:" ? "wss://" : "ws://"; + window.ws = new WebSocket(wsProto + location.host + "/custom/ws"); window.ws.onopen = () => { ws_is_open = true; sendAuth(false);