From d329ee8a999174fec72f299cd20b127ace7ebced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20M=C3=BCller?= Date: Wed, 20 Mar 2024 20:48:07 +0100 Subject: [PATCH] fix: remove trailing slashes of pathname Fixes issue described in #334 --- assets/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/app.js b/assets/js/app.js index fe4f0b3a..2ec8e4bc 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -132,7 +132,7 @@ function connectSocket() { var ws, loc = window.location; var protocol = loc.protocol == "https:" ? "wss:" : "ws:" - ws = new WebSocket(protocol + "//" + loc.hostname + (loc.port ? ":" + loc.port : "") + loc.pathname + "/ws"); + ws = new WebSocket(protocol + "//" + loc.hostname + (loc.port ? ":" + loc.port : "") + loc.pathname.replace(/\/$/, "") + "/ws"); ws.onerror = function(evt) { ws.close();