From 393fe985b86e16465a9f4ddff6cf5b6d56d0764d Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 7 Jun 2026 12:26:42 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20wss=20f=C3=BCr=20HTTPS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/index.html b/src/public/index.html index 994c3de..ed02481 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -1182,7 +1182,7 @@ function App() { // WebSocket for live status useEffect(() => { function connect() { - const ws = new WebSocket(`ws://${location.host}/ws`); + const ws = new WebSocket(`${location.protocol === 'https:' ? 'wss:' : 'ws:'}//${location.host}/ws`); ws.onopen = () => setWsStatus(s => ({ ...s, connected: true })); ws.onclose = () => { setWsStatus(s => ({ ...s, connected: false })); setTimeout(connect, 3000); }; ws.onerror = () => ws.close();