From c49ab99a2c2f9c49e49f2dff6a684faa9e1c6800 Mon Sep 17 00:00:00 2001 From: Daniel Haselhan Date: Mon, 25 Mar 2024 09:30:42 -0700 Subject: [PATCH] Add Production Routes to API Guard * Production is set to have /api/ added to all routes breaking how the maintenance guard normally checks. --- services/apps/alcs/src/portal/guards/maintenance.guard.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/apps/alcs/src/portal/guards/maintenance.guard.ts b/services/apps/alcs/src/portal/guards/maintenance.guard.ts index 6c28b7b296..2a0ff61f25 100644 --- a/services/apps/alcs/src/portal/guards/maintenance.guard.ts +++ b/services/apps/alcs/src/portal/guards/maintenance.guard.ts @@ -30,7 +30,9 @@ export class MaintenanceGuard implements CanActivate { if ( req.routeOptions.url.startsWith('/portal') || - req.routeOptions.url.startsWith('/public') + req.routeOptions.url.startsWith('/public') || + req.routeOptions.url.startsWith('/api/portal') || + req.routeOptions.url.startsWith('/api/public') ) { const maintenanceMode = await this.configurationRepository.findOne({ where: {