diff --git a/backend/templates/debug.html.tera b/backend/templates/debug.html.tera index 389cbfa..9e96d2c 100644 --- a/backend/templates/debug.html.tera +++ b/backend/templates/debug.html.tera @@ -91,7 +91,8 @@ const network = new vis.Network(container, data, options); - var ws = new WebSocket(`ws://${window.location.hostname}:3012`); + + var ws = new WebSocket(`${window.location.protocol.startsWith("https") ? 'wss' : 'ws'}://${window.location.hostname}:3012`); ws.onmessage = function (event) { handle_event(JSON.parse(event.data)); };