Merge pull request #601 from vcangi/bugfix/trailing-slash

Fix trailing slash when adding server causes connection faliure.
This commit is contained in:
Andrew Rabert 2024-04-20 11:51:11 -04:00 committed by GitHub
commit 2949fc34fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);