From 5e3b4b027993a97e7e27d1eaa5ac8940129ac2f8 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Fri, 20 Feb 2026 03:55:36 -0800 Subject: [PATCH] fix wss --- frontend.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend.tsx b/frontend.tsx index 8c84637..4182236 100644 --- a/frontend.tsx +++ b/frontend.tsx @@ -358,7 +358,8 @@ function App() { const mainRef = useRef(null); useEffect(() => { - const wsUrl = `ws://${window.location.host}/ws`; + const wsProtocol = window.location.protocol === "https:" ? "wss:" : "ws:"; + const wsUrl = `${wsProtocol}//${window.location.host}/ws`; let ws: WebSocket; let reconnectTimer: ReturnType;