mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
whitelist instead o blacklist when to exclude middlewares
fix config whitelisting
This commit is contained in:
parent
94fe595dd7
commit
5bd43c45ed
@ -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 = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user