better env name RATE_LIMIT_WINDOWS_MINS

This commit is contained in:
Dave Horton
2022-04-05 17:29:58 -04:00
parent 8097f0afda
commit 8c54e80d46
2 changed files with 3 additions and 4 deletions

2
app.js
View File

@@ -92,7 +92,7 @@ const unless = (paths, middleware) => {
};
const limiter = rateLimit({
windowMs: (process.env.RATE_LIMIT_WINDOWS_MS || 5) * 60 * 1000, // 5 minutes
windowMs: (process.env.RATE_LIMIT_WINDOWS_MINS || 5) * 60 * 1000, // 5 minutes
max: process.env.RATE_LIMIT_MAX_PER_WINDOW || 600, // Limit each IP to 600 requests per `window`
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
legacyHeaders: false, // Disable the `X-RateLimit-*` headers