FIX - NAS DEPLOY: стабилизация real-domain Tasker OIDC baseline

This commit is contained in:
DCCONSTRUCTIONS
2026-05-14 12:14:07 +03:00
parent 4eb6362565
commit c455ce3c34
3 changed files with 79 additions and 11 deletions
+22 -1
View File
@@ -30,7 +30,28 @@ export function buildNodeDCOIDCLoginUrl(nextPath?: string | null): string {
}
export function buildNodeDCLauncherUrl(): string {
return process.env.VITE_NODEDC_LAUNCHER_URL || "http://launcher.local.nodedc/";
const configuredUrl = process.env.VITE_NODEDC_LAUNCHER_URL;
if (configuredUrl) {
return configuredUrl;
}
if (typeof window === "undefined") {
return "http://launcher.local.nodedc/";
}
const hostname = window.location.hostname.toLowerCase();
if (hostname.endsWith(".nodedc.ru")) {
return "https://hub.nodedc.ru/";
}
if (hostname.endsWith(".nas.nodedc")) {
const port = window.location.port ? `:${window.location.port}` : "";
return `${window.location.protocol}//launcher.nas.nodedc${port}/`;
}
return "http://launcher.local.nodedc/";
}
export function buildNodeDCBrandConfigUrl(): string {