From 3d2371c449e7f07ab903f99c04aa933783f60090 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 30 May 2023 11:00:43 +0530 Subject: [PATCH 1/2] fix: set fallback dashboard path while creating config Signed-off-by: Pranav C --- packages/nocodb/src/utils/nc-config/NcConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb/src/utils/nc-config/NcConfig.ts b/packages/nocodb/src/utils/nc-config/NcConfig.ts index b8d3654551..3b25d952f9 100644 --- a/packages/nocodb/src/utils/nc-config/NcConfig.ts +++ b/packages/nocodb/src/utils/nc-config/NcConfig.ts @@ -149,7 +149,7 @@ export class NcConfig { port: process.env.NC_PORT, tryMode: !!process.env.NC_TRY, worker: !!process.env.NC_WORKER, - dashboardPath: process.env.NC_DASHBOARD_PATH, + dashboardPath: process.env.NC_DASHBOARD_PATH || '/dashboard', publicUrl: process.env.NC_PUBLIC_URL, }); } From 477420fd50058a0d23c7df2e6d216aa7ba97e0c8 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 30 May 2023 15:57:44 +0530 Subject: [PATCH 2/2] refactor: set default dashboard path inside the root method which generates config Signed-off-by: Pranav C --- packages/nocodb/src/utils/nc-config/NcConfig.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/utils/nc-config/NcConfig.ts b/packages/nocodb/src/utils/nc-config/NcConfig.ts index 3b25d952f9..cd8cb0e2fe 100644 --- a/packages/nocodb/src/utils/nc-config/NcConfig.ts +++ b/packages/nocodb/src/utils/nc-config/NcConfig.ts @@ -126,6 +126,8 @@ export class NcConfig { if (dashboardPath) { ncConfig.dashboardPath = dashboardPath; + } else { + ncConfig.dashboardPath = '/dashboard'; } try { @@ -149,7 +151,7 @@ export class NcConfig { port: process.env.NC_PORT, tryMode: !!process.env.NC_TRY, worker: !!process.env.NC_WORKER, - dashboardPath: process.env.NC_DASHBOARD_PATH || '/dashboard', + dashboardPath: process.env.NC_DASHBOARD_PATH, publicUrl: process.env.NC_PUBLIC_URL, }); }