unstale

npm / express-rate-limit

express-rate-limit

What changed in express-rate-limit 6 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-29.

14 breaking2 deprecations3 new APIs and options8 behavior and defaults1 tooling

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

express-rate-limit 78 changes

Breaking changes 5

  • The deprecated option was removed; use standardHeaders: 'draft-6' instead.

    7.0.0release notes

  • Setting max to 0 now blocks all requests instead of allowing them through; use skip to replicate the old behavior.

    7.0.0release notes

  • The minimum required Node version changed from v14 to v16.

    7.0.0release notes

  • The deprecated option was removed; a custom handler option can replicate its behavior.

    7.0.0release notes

  • Renames req.rateLimit.current to req.rateLimit.used; current remains as a hidden getter but is omitted from key iteration and JSON.stringify().

    7.0.0release notes

Deprecations 1

  • The limit configuration option is now preferred over max, though max remains supported and behavior is unchanged.

    7.0.0release notes

New APIs and options 1

  • The validate config option can now be an object with keys to enable or disable specific validation checks.

    7.0.0release notes

Behavior and default changes 1

  • MemoryStore now uses precise, per-user reset times instead of a global window that resets all users at once.

    7.0.0release notes

express-rate-limit 620 changes

Breaking changes 9

  • The deprecated option is removed; delay functionality moved to express-slow-down.

    6.0.0release notes

  • The deprecated option is removed; delay functionality moved to express-slow-down.

    6.0.0release notes

  • express 4.x is now a peer dependency.

    6.0.0release notes

  • The deprecated option is removed; use a key generator that returns a constant value.

    6.0.0release notes

  • The custom store method incr is renamed to increment.

    6.0.0release notes

  • Renames the headers option to legacyHeaders.

    6.0.0release notes

  • The deprecated method is removed; use limiter.resetKey instead.

    6.0.0release notes

  • The package now requires NodeJS version 12.9.0 or greater.

    6.0.0release notes

  • Renames the draft_polli_ratelimit_headers option to standardHeaders.

    6.0.0release notes

Deprecations 1

  • The configuration option is deprecated; replace it with a custom handler that checks the number of hits.

    6.0.0release notes

New APIs and options 2

  • The package is exported as both ESM and CJS.

    6.0.0release notes

  • Custom stores can implement init to set themselves up using options passed to the middleware.

    6.0.0release notes

Behavior and default changes 7

  • Old stores are automatically promisified and used.

    6.0.0release notes

  • Custom store decrement can now return a promise.

    6.0.0release notes

  • Custom store increment can now return a promise.

    6.0.0release notes

  • keyGenerator can now be an async function or return a promise.

    6.0.0release notes

  • Custom store resetAll can now return a promise.

    6.0.0release notes

  • Custom store resetKey can now return a promise.

    6.0.0release notes

  • The header is now sent if either legacyHeaders or standardHeaders is set.

    6.0.0release notes

Tooling 1

  • Typescript support is improved; the library was rewritten in Typescript.

    6.0.0release notes