Jeremy Willans hai 6 meses
pai
achega
1d5c81bff5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      static/js/base.js

+ 1 - 1
static/js/base.js

@@ -166,7 +166,7 @@ function connectWebSocket() {
         ws.close();
     }
 
-    ws = new WebSocket(`ws://${window.location.host}/ws/status`);
+    ws = new WebSocket(`${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}/ws/status`);
     
     ws.onopen = function() {
         console.log("WebSocket connection established");