diff --git a/ESP32_AP-Flasher/data/www/main.js.gz b/ESP32_AP-Flasher/data/www/main.js.gz index 0f60ffcd..a065db4a 100644 Binary files a/ESP32_AP-Flasher/data/www/main.js.gz and b/ESP32_AP-Flasher/data/www/main.js.gz differ diff --git a/ESP32_AP-Flasher/wwwroot/main.js b/ESP32_AP-Flasher/wwwroot/main.js index a8937a3b..338b2d7b 100644 --- a/ESP32_AP-Flasher/wwwroot/main.js +++ b/ESP32_AP-Flasher/wwwroot/main.js @@ -113,7 +113,8 @@ function loadTags(pos) { } function connect() { - socket = new WebSocket("ws://" + location.host + "/ws"); + protocol = location.protocol == "https:" ? "wss://" : "ws://"; + socket = new WebSocket(protocol + location.host + "/ws"); socket.addEventListener("open", (event) => { showMessage("websocket connected");