From e19307db172df51099dc5a69467737ac876e58f0 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 21 May 2023 13:46:05 +0200 Subject: fix websocket endpoint url --- web/client.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/client.html b/web/client.html index a330c00..10ba320 100644 --- a/web/client.html +++ b/web/client.html @@ -190,7 +190,8 @@ playing.appendChild(songLabel); } - let socket = new WebSocket("ws://localhost:8080/ws"); + let socket_url = "ws://"+location.hostname + (location.port ? ":" + location.port: "") + "/ws"; + let socket = new WebSocket(socket_url); console.log("Attempting Connection..."); socket.onopen = () => { -- cgit v1.2.3