diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index c2722d62a..a200796d0 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -22,8 +22,9 @@ const environment = { PRODUCTION: env.NODE_ENV === 'production', // used for staging enviroments if 'PRODUCTION=true' and 'PRODUCTION_DB_CLEAN_ALLOW=true' PRODUCTION_DB_CLEAN_ALLOW: env.PRODUCTION_DB_CLEAN_ALLOW === 'true' || false, // default = false - DISABLED_MIDDLEWARES: - (env.NODE_ENV !== 'production' && env.DISABLED_MIDDLEWARES?.split(',')) ?? [], + DISABLED_MIDDLEWARES: ['test', 'development'].includes(env.NODE_ENV) + ? (env.DISABLED_MIDDLEWARES?.split(',') ?? []) + : [], } const required = {