remove usage of constants.DASHBOARD_SUBDOMAIN
This commit is contained in:
+6
-5
@@ -197,8 +197,8 @@ async function initialize() {
|
||||
await tasks.stopAllTasks();
|
||||
|
||||
// always generate webadmin config since we have no versioning mechanism for the ejs
|
||||
const { domain:dashboardDomain } = await dashboard.getLocation();
|
||||
if (dashboardDomain) await onDashboardLocationSet(dashboardDomain);
|
||||
const dashboardLocation = await dashboard.getLocation();
|
||||
if (dashboardLocation.domain) await onDashboardLocationSet(dashboardLocation.subdomain, dashboardLocation.domain);
|
||||
|
||||
// configure nginx to be reachable by IP when not activated. for the moment, the IP based redirect exists even after domain is setup
|
||||
// just in case user forgot or some network error happenned in the middle (then browser refresh takes you to activation page)
|
||||
@@ -253,10 +253,11 @@ async function onDeactivated() {
|
||||
await oidc.stop();
|
||||
}
|
||||
|
||||
async function onDashboardLocationSet(dashboardDomain) {
|
||||
assert.strictEqual(typeof dashboardDomain, 'string');
|
||||
async function onDashboardLocationSet(subdomain, domain) {
|
||||
assert.strictEqual(typeof subdomain, 'string');
|
||||
assert.strictEqual(typeof domain, 'string');
|
||||
|
||||
await safe(reverseProxy.writeDashboardConfig(dashboardDomain), { debug }); // ok to fail if no disk space
|
||||
await safe(reverseProxy.writeDashboardConfig(subdomain, domain), { debug }); // ok to fail if no disk space
|
||||
await oidc.start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user