WebSocket SSL Support #13

Merged
kokarare1212 merged 2 commits from main into main 2023-10-05 15:26:07 +03:00
2 changed files with 2 additions and 2 deletions
File diff suppressed because one or more lines are too long
@@ -223,7 +223,7 @@ var ws = null;
var wsTimeout = 0;
var wsConnected = false;
const wsConnect = () => {
ws = new WebSocket("ws://" + location.host + "/ws");
ws = new WebSocket((location.protocol == "https:" ? "wss://" : "ws://") + location.host + "/ws");
ws.binaryType = "arraybuffer";
ws.onopen = () => {
ws.send("alive?");