Stabilize DetMir contour checks

This commit is contained in:
igor04091968
2026-07-05 23:18:25 +03:00
parent 234afdd184
commit 93f517fbf7
8 changed files with 249 additions and 60 deletions
+3 -1
View File
@@ -24,7 +24,9 @@ function authHeaders() {
}
function normalizeBaseUrl(raw) {
const value = raw.endsWith("/") ? raw : `${raw}/`;
const trimmed = String(raw || "").trim();
const withScheme = /^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed) ? trimmed : `http://${trimmed}`;
const value = withScheme.endsWith("/") ? withScheme : `${withScheme}/`;
return new URL(value);
}