Releases: express-rate-limit/express-rate-limit
Releases · express-rate-limit/express-rate-limit
v7.1.1
Misc
- Enabled provenance statement generation, see https://github.com/express-rate-limit/express-rate-limit#406.
You can view the full changelog here.
v7.1.0
v7.0.2
v7.0.1
v7.0.0
Breaking
- Changed behavior when
max
is set to 0:- Previously,
max: 0
was treated as a 'disable' flag and would allow all requests through. - Starting with v7, all requests will be blocked when max is set to 0.
- To replicate the old behavior, use the skip function instead.
- Previously,
- Renamed
req.rateLimit.current
toreq.rateLimit.used
.current
is now a hidden getter that will return theused
value, but it will not appear when iterating over the keys or callingJSON.stringify()
.
- Changed the minimum required Node version from v14 to v16.
express-rate-limit
now targetses2022
in TypeScript/ESBuild.
- Bumped TypeScript from v4 to v5 and
dts-bundle-generator
from v7 to v8.
Deprecated
- Removed the
draft_polli_ratelimit_headers
option (it was deprecated in v6).- Use
standardHeaders: 'draft-6'
instead.
- Use
- Removed the
onLimitReached
option (it was deprecated in v6).- This is an example of how to replicate it's behavior with a custom
handler
option.
- This is an example of how to replicate it's behavior with a custom
Changed
- The
MemoryStore
now uses precise, per-user reset times rather than a global window that resets all users at once. - The
limit
configuration option is now prefered tomax
.- It still shows the same behavior, and
max
is still supported. The change was made to better align with terminology used in the IETF standard drafts.
- It still shows the same behavior, and
Added
- The
validate
config option can now be an object with keys to enable or disable specific validation checks. For more information, see this.
v6.11.2
v6.11.1
v6.11.0
v6.10.0
Added
- Support for combined
RateLimit
header from the RateLimit header fields for HTTP standardization draft adopted by the IETF. Enable by settingstandardHeaders: 'draft-7'
- New
standardHeaders: 'draft-6'
option, treated equivalent tostandardHeaders: true
from previous releases. (true
andfalse
are still supported.) - New
RateLimit-Policy
header added whenstandardHeaders
is set to'draft-6'
,'draft-7'
, ortrue
- Warning when using deprecated
draft_polli_ratelimit_headers
option - Warning when using deprecated
onLimitReached
option - Warning when
totalHits
value returned from Store is invalid