Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sveltekit-rate-limiter

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sveltekit-rate-limiter - npm Package Versions

23

0.6.1

Diff

Changelog

Source

[0.6.1] - 2024-09-19

Added

  • Plugins can now use an array of rates for the rate property, so limits like "1 per secord, 100 per hour" can be set.
  • New limiters: CloudflareIPRateLimiter and CloudflareIPUARateLimiter that can be imported from sveltekit-rate-limiter/limiters.

Changed

  • The RateLimiterStore interface now uses number as second parameter to the add method.
ciscoheat
published 0.6.0 •

ciscoheat
published 0.5.2 •

Changelog

Source

[0.5.2] - 2024-07-15

Added

  • Some additional rate units: 2m | 5m | 10m | 45m
ciscoheat
published 0.5.1 •

Changelog

Source

[0.5.1] - 2024-03-18

Fixed

  • Interfaces now uses MaybePromise instead of Promise.
ciscoheat
published 0.5.0 •

Changelog

Source

[0.5.0] - 2024-03-17

Changed

  • Plugins returning 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).

Added

  • Added "extra data" type parameter for the rate limiter, so plugins can be provided information outside the request event. See README for an example.
ciscoheat
published 0.4.3 •

Changelog

Source

[0.4.3] - 2024-01-16

Changed

  • The "rates" object options (IP, IPUA, cookie) should now be set in the top of the configuration for RateLimiter, no need for a nested object.
  • Deprecated the ms rate unit, it's not reliable due to OS timing issues.

Added

  • Added more units for milliseconds and seconds.
ciscoheat
published 0.4.2 •

Changelog

Source

[0.4.2] - 2023-12-18

Fixed

  • Compatibility with SvelteKit 2.
ciscoheat
published 0.4.1 •

Changelog

Source

[0.4.1] - 2023-08-21

Fixed

  • Hash function is now compatible with any environment that supports Web Crypto API, including Cloudflare workers. (Wasn't working properly in 0.4.0)
ciscoheat
published 0.4.0 •

Changelog

Source

[0.4.0] - 2023-08-19

Changed

  • limiter.preflight is now async and must be awaited!
  • Cookie limiter options now takes a serializeOptions, that can be used for customizing the cookie.

Added

  • hashFunction option, for custom hashing. Defaults to Web Crypto API SHA-256, will fallback to NodeJS crypto if not available.

Fixed

  • Hash function is now compatible with any environment that supports Web Crypto API, including Cloudflare workers.
ciscoheat
published 0.3.5 •

Changelog

Source

[0.3.5] - 2023-08-14

Added

  • Added a RetryAfterRateLimiter, that provides information for setting a Retry-After header.
  • Added clear method to the rate limiters.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc