Skip to content

Commit

Permalink
adjust rate limit max allowed per time window (after testing successf…
Browse files Browse the repository at this point in the history
…ully in heroku)
  • Loading branch information
ihouwat committed Jun 18, 2023
1 parent fe13082 commit f1edc50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ app.set('trust proxy', 1); // Trust first proxy for rate limiter
const PORT = process.env.PORT || 3000;
const limiter = rateLimit({
windowMs: 1 * 60 * 1000, // 1 minutes
max: 1, // Limit each IP to 120 requests per `window`
max: 120, // Limit each IP to 120 requests per `window`
message: 'Too many requests from this IP',
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
legacyHeaders: false, // Disable the `X-RateLimit-*` headers
Expand Down

0 comments on commit f1edc50

Please sign in to comment.