From 7590fc309d268d92e6287bbecb5ba99bf24bfd79 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Apr 2026 12:23:05 +0000 Subject: [PATCH] fix(ws): use wss:// on HTTPS to prevent mixed content SecurityError blocking module execution --- lightsync/frontend/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightsync/frontend/app.js b/lightsync/frontend/app.js index 19e211b..884d605 100644 --- a/lightsync/frontend/app.js +++ b/lightsync/frontend/app.js @@ -2,7 +2,7 @@ // WebSocket stub + device list loader // Phase 2 expands audio, transport, and WS protocol -const WS_URL = `ws://${location.host}/ws`; +const WS_URL = `${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/ws`; async function apiPost(path, data) { const res = await fetch(path, {