diff --git a/backend/src/api/routes/index.ts b/backend/src/api/routes/index.ts index 476c0d430a68..45c5864a890f 100644 --- a/backend/src/api/routes/index.ts +++ b/backend/src/api/routes/index.ts @@ -49,9 +49,6 @@ function addApiRoutes(app: Application): void { res.sendStatus(404); }); - // Cannot be added to the route map because it needs to be added before the maintenance handler - app.use("/configuration", configuration); - if (isDevEnvironment()) { //disable csp to allow assets to load from unsecured http app.use((req, res, next) => { @@ -67,6 +64,9 @@ function addApiRoutes(app: Application): void { // }); } + // Cannot be added to the route map because it needs to be added before the maintenance handler + app.use("/configuration", configuration); + addSwaggerMiddlewares(app); app.use(