|
|
|
@ -195,7 +195,14 @@ function checkTimeDrift(utcTimeA, utcTimeB, statusPrefix) { |
|
|
|
} |
|
|
|
|
|
|
|
function checkDomain(browserURL, serverURL) { |
|
|
|
if (serverURL == browserURL) { |
|
|
|
try { |
|
|
|
const browser = new URL(browserURL); |
|
|
|
const server = new URL(serverURL); |
|
|
|
|
|
|
|
const browserPath = browser.pathname.split("/").filter(Boolean).join("/"); |
|
|
|
const serverPath = server.pathname.split("/").filter(Boolean).join("/"); |
|
|
|
|
|
|
|
if (browser.origin === server.origin && browserPath === serverPath) { |
|
|
|
document.getElementById("domain-success").classList.remove("d-none"); |
|
|
|
domainCheck = true; |
|
|
|
} else { |
|
|
|
@ -203,6 +210,20 @@ function checkDomain(browserURL, serverURL) { |
|
|
|
} |
|
|
|
|
|
|
|
// Check for HTTPS at domain-server-string
|
|
|
|
if (server.protocol === "https:") { |
|
|
|
document.getElementById("https-success").classList.remove("d-none"); |
|
|
|
httpsCheck = true; |
|
|
|
} else { |
|
|
|
document.getElementById("https-warning").classList.remove("d-none"); |
|
|
|
} |
|
|
|
} catch { |
|
|
|
if (serverURL == browserURL) { |
|
|
|
document.getElementById("domain-success").classList.remove("d-none"); |
|
|
|
domainCheck = true; |
|
|
|
} else { |
|
|
|
document.getElementById("domain-warning").classList.remove("d-none"); |
|
|
|
} |
|
|
|
|
|
|
|
if (serverURL.startsWith("https://")) { |
|
|
|
document.getElementById("https-success").classList.remove("d-none"); |
|
|
|
httpsCheck = true; |
|
|
|
@ -210,6 +231,7 @@ function checkDomain(browserURL, serverURL) { |
|
|
|
document.getElementById("https-warning").classList.remove("d-none"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function initVersionCheck(dj) { |
|
|
|
const serverInstalled = dj.current_release; |
|
|
|
|