fix(ui): use wss:// for WebSocket on HTTPS pages (#315)

This commit is contained in:
Sergey authored and GitHub committed 2026-01-14 08:34:53 -05:00
1 parent 8daabdde5c
commit db58c6bbca
1 file changed
+2 -1
+2 -1
View File
@@ -69,7 +69,8 @@ export function useWebSocket() {
}
setStatus('connecting');
const ws = new WebSocket(`ws://${window.location.host}`);
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const ws = new WebSocket(`${protocol}//${window.location.host}`);
wsRef.current = ws;
ws.onopen = () => {