From 66aaf9445bd1f7ae61840fcbd0ffbe492b6b2548 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 31 May 2026 16:03:45 +0100 Subject: [PATCH] Use page host for Eve browser broker --- web/surface.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/surface.js b/web/surface.js index 31cf722..5b6e61c 100644 --- a/web/surface.js +++ b/web/surface.js @@ -37,7 +37,9 @@ function setActiveTab(tab) { function openVoidBot() { closeSocket(); - const url = "ws://127.0.0.1:8795/eve/deck"; + const scheme = location.protocol === "https:" ? "wss:" : "ws:"; + const host = location.hostname || "127.0.0.1"; + const url = `${scheme}//${host}:8795/eve/deck`; statusEl.textContent = `connecting ${url}`; socket = new WebSocket(url); socket.addEventListener("open", () => {