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, {