feat: warn when deprecated rateLimits is in config

This commit is contained in:
Bobby Wibowo 2022-07-14 18:34:50 +07:00
parent f40c9e0287
commit f0856239c3
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -70,6 +70,9 @@ if (Array.isArray(config.rateLimiters)) {
safe.use(route, rateLimiterInstance.middleware)
}
}
} else if (config.rateLimits) {
logger.error('Config option "rateLimits" is deprecated.')
logger.error('Please consult the provided sample file for the new option "rateLimiters".')
}
// Helmet security headers