Releases: adonisjs/limiter
Add support for weighted rate limiting
3.0.1 (2026-03-13)
What's Changed
- Feat/weighted rate limiting by @MaximeMRF in #16
New Contributors
- @MaximeMRF made their first contribution in #16
Full Changelog: v3.0.0...v3.0.1
Tag as latest
3.0.0 (2026-02-25)
Check all 3.0.0 pre-releases to get a better sense of the changes
Full Changelog: v2.4.0...v3.0.0
Multi limiter to act on multiple limiters together
3.0.0-next.1 (2025-10-28)
In specific scenarios, we may want to act on multiple limiters in a single go, and this is where the Multi Limiter can simplify the code. For example, during login, you should prevent numerous invalid requests based on both the user's IP address and email address.
In this scenario, instead of creating 2 limiters, running the action, and, on failure, consuming one point per limiter, you can encapsulate the entire logic using the Multi Limiter and the penalize method. For example:
const ipKey = `login_${request.ip()}`
const emailKey = `login_${request.ip()}_${payload.email}`
const loginLimiter = limiter.multi([
{ duration: '1 min', requests: 10, key: ipKey },
{ duration: '1 min', requests: 5, blockDuration: '20 mins', key: emailKey },
])
await loginLimiter.penalize(() => {
return User.verifyCredentials(payload.email, payload.password)
})Features
- add multi limiter to execute an action on multiple limiters (7d35687)
Full Changelog: v3.0.0-next.0...v3.0.0-next.1
Target v7
3.0.0-next.0 (2025-09-22)
Full Changelog: v2.4.0...v3.0.0-next.0
Add support for SQLite
2.4.0 (2025-04-15)
Features
- add sqlite support (928395b)
What's Changed
- feature: add sqlite support by @muco-rolle in #14
New Contributors
- @muco-rolle made their first contribution in #14
Full Changelog: v2.3.3...v2.4.0
Update dependencies
2.3.3 (2024-12-23)
Full Changelog: v2.3.2...v2.3.3
Fix X-RateLimit-Reset header to use ISO date time strings
Full Changelog: v2.3.1...v2.3.2
Update dependencies
Full Changelog: v2.3.0...v2.3.1
Final set of improvements during the public release
- refactor: make deleteInMemoryBlockedKeys method optional b7df37b
- refactor: block keys via penalize method 49489e5
- refactor: allow duration to be optional during set method 115ed7b
- refactor: return error from penalize method instead of throwing it 8418a83
- refactor: make attempt method return early if all requests have been exhausted 225a675
Full Changelog: v2.2.1...v2.3.0
Improvements to decrement and penalize methods
- refactor: clear key when penalize method gets successful response 2133576
- refactor: make decrement method safe from getting into negative values 1479c80
Full Changelog: v2.2.0...v2.2.1