Files
MineGeo/desktop/navigation.cjs
pavel444-byte 1f254b29a2
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 5m57s
Update MineGeo domain and harden process supervision
2026-10-15 20:35:39 +05:00

18 lines
393 B
JavaScript

const SITE_URL = "https://minegeo.site";
function isInternal(value) {
try {
return new URL(value).origin === SITE_URL;
} catch {
return false;
}
}
function isExternal(value) {
try {
const url = new URL(value);
return url.protocol === "https:" && !url.username && !url.password;
} catch {
return false;
}
}
module.exports = { SITE_URL, isInternal, isExternal };