Fix trailing slash when adding server causes connection faliure.

This commit is contained in:
Vin Cangi 2024-04-20 10:01:45 -04:00
parent e037ea76ae
commit 0350501009

View File

@ -5,6 +5,7 @@ async function tryConnect(server) {
if (!server.startsWith("http")) {
server = "http://" + server;
}
server = server.replace(/\/+$/, "");
const url = new URL("/System/Info/Public", server);
const response = await fetch(url);