From fb6f25fb5f4009bfea9536f7616db24d32f8fc7f Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Sun, 15 Sep 2024 11:38:54 +0200 Subject: [PATCH] fix: Properly set URL for settings check if running in a subdirectory Signed-off-by: Julius Knorr --- src/settings/Settings.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/settings/Settings.vue b/src/settings/Settings.vue index c5de36b..d3497ac 100644 --- a/src/settings/Settings.vue +++ b/src/settings/Settings.vue @@ -81,8 +81,10 @@ export default { await this.verifyConnection(data) }, async verifyConnection(data) { - const path = '/socket.io' - const socket = io(this.serverUrl, { + const url = new URL(this.serverUrl) + const path = url.pathname.replace(/\/$/, '') + '/socket.io' + + const socket = io(url.origin, { path, withCredentials: true, auth: {