Skip to content

Commit 00eef58

Browse files
committed
feat: OKO-113 WSS
1 parent 62d736c commit 00eef58

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

frontend/src/App.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@
6565
6666
if ($socket != null) return;
6767
68-
$socket = new WebSocket(`ws://${window.location.host}/api/ws`);
68+
let wsProtocol = window.location.protocol === "https:" ? "wss" : "ws";
69+
70+
$socket = new WebSocket(`${wsProtocol}://${window.location.host}/api/ws`);
6971
$socket?.addEventListener("open", onOpen);
7072
})();
7173

0 commit comments

Comments
 (0)