From 7e5b6c943c1b9b14f10d783a55e16e04f59adf63 Mon Sep 17 00:00:00 2001 From: Waldek Date: Fri, 21 May 2021 09:57:40 +0200 Subject: [PATCH] Update hbmon.js --- html/scripts/hbmon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/scripts/hbmon.js b/html/scripts/hbmon.js index 1ef37b4..3dc2d50 100644 --- a/html/scripts/hbmon.js +++ b/html/scripts/hbmon.js @@ -12,7 +12,7 @@ opb_table = document.getElementById('opb'); peers_table = document.getElementById('peers'); - wsuri = "ws://" + window.location.hostname + ":9000"; + wsuri = (((window.location.protocol === "https:") ? "wss://" : "ws://") + window.location.hostname + ":9000"); if ("WebSocket" in window) { sock = new WebSocket(wsuri);