sveltekit-rate-limiter
Advanced tools
Changelog
[0.6.1] - 2024-09-19
rate
property, so limits like "1 per secord, 100 per hour" can be set.CloudflareIPRateLimiter
and CloudflareIPUARateLimiter
that can be imported from sveltekit-rate-limiter/limiters
.RateLimiterStore
interface now uses number
as second parameter to the add
method.Changelog
[0.5.0] - 2024-03-17
null
weren't fully indeterminate: They will now limit the request only if no other limited have passed. As soon as another plugin passes, any subsequent null
result will pass (for the current request).Changelog
[0.4.3] - 2024-01-16
IP
, IPUA
, cookie
) should now be set in the top of the configuration for RateLimiter
, no need for a nested object.ms
rate unit, it's not reliable due to OS timing issues.Changelog
[0.4.1] - 2023-08-21
Changelog
[0.4.0] - 2023-08-19
limiter.preflight
is now async and must be awaited!serializeOptions
, that can be used for customizing the cookie.hashFunction
option, for custom hashing. Defaults to Web Crypto API SHA-256, will fallback to NodeJS crypto if not available.Changelog
[0.3.5] - 2023-08-14
RetryAfterRateLimiter
, that provides information for setting a Retry-After header.clear
method to the rate limiters.