RayMelius Claude Sonnet 4.6 commited on
Commit
d7416cd
·
1 Parent(s): 292744f

Fix WebSocket: use wss:// on HTTPS, ws:// on HTTP

Browse files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. web/index.html +2 -1
web/index.html CHANGED
@@ -2891,7 +2891,8 @@ async function fetchSecondaryData() {
2891
  }
2892
 
2893
  function connectWebSocket() {
2894
- const wsUrl = `ws://${window.location.host}/ws/stream`;
 
2895
  ws = new WebSocket(wsUrl);
2896
 
2897
  ws.onopen = () => {
 
2891
  }
2892
 
2893
  function connectWebSocket() {
2894
+ const wsProto = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
2895
+ const wsUrl = `${wsProto}//${window.location.host}/ws/stream`;
2896
  ws = new WebSocket(wsUrl);
2897
 
2898
  ws.onopen = () => {