ARCH - TASKER DEPLOY: закрепление live baseline и env-driven сборки
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
export function buildNodeDCLauncherUrl(): string {
|
||||
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 {
|
||||
return new URL("/api/public/brand", buildNodeDCLauncherUrl()).toString();
|
||||
}
|
||||
Reference in New Issue
Block a user