From 96089255722067001a53d9d3fece27f629d8b358 Mon Sep 17 00:00:00 2001 From: zyl Date: Tue, 14 Jan 2025 10:41:01 -0800 Subject: [PATCH] fix bug when serving on a host or port different from default --- src/embedded/js/refresh_websocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/embedded/js/refresh_websocket.js b/src/embedded/js/refresh_websocket.js index 9df57ab..5209584 100644 --- a/src/embedded/js/refresh_websocket.js +++ b/src/embedded/js/refresh_websocket.js @@ -6,7 +6,7 @@ let socket; function start(reload) { - socket = new WebSocket("ws://127.0.0.1:8080"); + socket = new WebSocket(`ws://${location.host}`); let reloading = false; socket.onmessage = function (ev) { if (ev.data === "reload") {