fix(ws): use wss:// on HTTPS to prevent mixed content SecurityError blocking module execution
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user