refactor: move /configuration below the artificial dev slowdown

This commit is contained in:
Miodec 2024-03-14 22:35:12 +01:00
parent 6b1a413f4f
commit 0ac470656c

View file

@ -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(