From 1d1bb11dd04c37af1091f275030d36de0ea73b90 Mon Sep 17 00:00:00 2001 From: Fred G Date: Mon, 2 Sep 2024 15:35:40 +0200 Subject: [PATCH] Fix removing trailing slash making JMP unable to connect to some servers --- native/find-webclient.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/native/find-webclient.js b/native/find-webclient.js index 44fb32e..c236c08 100644 --- a/native/find-webclient.js +++ b/native/find-webclient.js @@ -5,9 +5,8 @@ async function tryConnect(server) { if (!server.startsWith("http")) { server = "http://" + server; } - server = server.replace(/\/+$/, ""); - - const url = server + "/System/Info/Public"; + serverBaseURL = server.replace(/\/+$/, ""); + const url = serverBaseURL + "/System/Info/Public"; const response = await fetch(url); if (response.ok && (await response.json()).Id) { const htmlResponse = await fetch(server);