fix(ws): use wss:// on HTTPS to prevent mixed content SecurityError blocking module execution

This commit is contained in:
Claude
2026-04-06 12:23:05 +00:00
parent dc69cf2bc7
commit 7590fc309d

View File

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