From 47e9bb2047ab562bb7a580cccb9ace4713d20c70 Mon Sep 17 00:00:00 2001 From: schnusch Date: Fri, 31 Dec 2021 16:41:47 +0100 Subject: [PATCH] use relative URL for websocket --- webdata/fn.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webdata/fn.js b/webdata/fn.js index 9a010af..751bfd7 100644 --- a/webdata/fn.js +++ b/webdata/fn.js @@ -346,8 +346,7 @@ window.addEventListener("load", function() { showScene(opening); ws = new WebSocket( - (location.protocol == "http:" ? "ws:" : "wss:") + "//" + location.hostname + - (location.port ? ":" + location.port : "") + "/ws" + String(new URL("ws", location.href)).replace(/^http/, "ws") ); ws.onmessage = function(evt) {