npm / @nestjs/throttler
@nestjs/throttler
What changed in @nestjs/throttler 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
2 breaking2 new APIs and options2 behavior and defaults1 tooling5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@nestjs/throttler 612 changes
Breaking changes 2
With blockDuration: 0, Retry-After reports when the oldest hit expires rather than when the window ends.
The built-in tracker masks IPv6 addresses to a subnet prefix, so clients within that subnet share a rate-limit counter. IPv6 tracker strings change shape, rotating storage keys once on upgrade.
New APIs and options 2
Adds a protected method subclasses can override to set rate limit headers; the guard uses res.setHeader() when res.header() is unavailable.
Configure the IPv6 subnet prefix length used by the default tracker.
Behavior and default changes 2
Storage no longer retains request contexts through per-hit timers; it records hit expiry times and prunes expired hits on access, and the idle-record sweep is no longer tied to the first request's context.
Idle records are removed after their window fully elapses and all pending hits and blocks have expired, preventing the in-memory map from growing indefinitely.
Tooling 1
Declares the supported Node versions in package engines, matching the range tested by the CI matrix.
Fixes and other changes 5
Numeric strings are coerced to numbers, and an explicit 0 is respected; with blockDuration: 0, rejected requests are not recorded and can pass as soon as the oldest hit expires.
Numeric strings are coerced to numbers, and an explicit 0 in @Throttle() or module options is respected instead of falling back to the default.
The guard logs a warning at boot when no throttler is configured; it otherwise limits nothing.
Numeric strings are coerced to numbers, and an explicit 0 in @Throttle() or module options is respected instead of falling back to the default.
Updates the package to support Nest version 12.