We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 62d736c + 00eef58 commit b8afb37Copy full SHA for b8afb37
1 file changed
frontend/src/App.svelte
@@ -65,7 +65,9 @@
65
66
if ($socket != null) return;
67
68
- $socket = new WebSocket(`ws://${window.location.host}/api/ws`);
+ let wsProtocol = window.location.protocol === "https:" ? "wss" : "ws";
69
+
70
+ $socket = new WebSocket(`${wsProtocol}://${window.location.host}/api/ws`);
71
$socket?.addEventListener("open", onOpen);
72
})();
73
0 commit comments