Skip to content

Make rate limiting settings configurable #997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kriswest opened this issue Apr 30, 2025 · 0 comments · May be fixed by #999
Open

Make rate limiting settings configurable #997

kriswest opened this issue Apr 30, 2025 · 0 comments · May be fixed by #999

Comments

@kriswest
Copy link
Contributor

kriswest commented Apr 30, 2025

Is your feature request related to a problem? Please describe.
Rate limiting is cutting in for our admin users and locking them out for upto 15 mins. The rate limiting settings are not currently configurable. Some pages involve multiple requests so the default settings don't allow anywhere near as many page loads as it might seem they do.

Describe the solution you'd like
The rate limiting settings in src\service\index.js are hard-coded:

const limiter = rateLimit({
  windowMs: 15 * 60 * 1000, // 15 minutes
  max: 100, // limit each IP to 100 requests per windowMs
});

Make both the window and max requests (within the window) configurable.

Describe alternatives you've considered

We could/should also consider increasing the default max requests or reduce the default window size to make lockouts less likely by default.

Additional context
I will have a crack at raising a PR for this.

@kriswest kriswest linked a pull request May 1, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant