elysia-rate-limit

Lightweight rate limiter plugin for Elysia.js

MIT License

Downloads
6.1K
Stars
53
Committers
5

Bot releases are visible (Hide)

elysia-rate-limit - v4.0.0 Latest Release

Published by github-actions[bot] 6 months ago

Major Changes

  • 17f10e3: BREAKING CHANGES remove responseCode, and responseMessage in favor of new errorResponse option. please consult with documentation for more details

Minor Changes

  • 17f10e3: added injectServer option
elysia-rate-limit - v3.2.2

Published by github-actions[bot] 6 months ago

Patch Changes

  • d4d7a62: added debug logs
  • 5e83844: fix context is being shared across multiple local scope
  • 5e83844: add example for multiple instance scoping
elysia-rate-limit - v3.2.1

Published by github-actions[bot] 6 months ago

Patch Changes

  • 2c5d035: fix generic value of generator types
elysia-rate-limit - v3.2.0

Published by github-actions[bot] 6 months ago

Minor Changes

  • ebe2c77: generators function now passed derive values as a thrid argruments
  • 55f0e22: allowing user to change plugin hooks scoping behavior
elysia-rate-limit - v3.1.4

Published by github-actions[bot] 6 months ago

Patch Changes

  • 9ffb155: plugin no longer server to be initialized
elysia-rate-limit - v3.1.3

Published by github-actions[bot] 7 months ago

Patch Changes

  • 7317819: nextReset time for default context always returns to year 1970. my bad
elysia-rate-limit - v3.1.2

Published by github-actions[bot] 7 months ago

Patch Changes

  • dea390c: default generator throws detailed warning message with reason
elysia-rate-limit - v3.1.1

Published by github-actions[bot] 7 months ago

Patch Changes

  • ca7f124: getNextResetTime implementation are now moved into defaultContext
  • 28316db: excluding unintended files that being published to npm
  • 1bcda4f: generator function now accepts server option as non-nullable. the plugin also checks if elysia server is initialized first.
  • d5056ec: file structure changes to match directory convention
elysia-rate-limit - v3.1.0

Published by github-actions[bot] 7 months ago

Minor Changes

  • 8779402: new default context strategy
elysia-rate-limit - v3.0.1

Published by github-actions[bot] 7 months ago

Patch Changes

  • 17047d9: refactor code structure
elysia-rate-limit - v3.0.0

Published by github-actions[bot] 7 months ago

Major Changes

  • 693125a: Breaking change Plugin compatibility with Elysia 1.0. Please refer to compatibility list in README for older Elysia, Bun versions.
elysia-rate-limit - v2.2.0

Published by github-actions[bot] 7 months ago

Minor Changes

  • b666627: Add second parameter to skip with the key so requests can be skipped based on their key
elysia-rate-limit - v2.1.0

Published by github-actions[bot] 7 months ago

Minor Changes

  • 0f53f96: reset the clock when attempting to manually reset the context (#10)
elysia-rate-limit - v2.0.1

Published by github-actions[bot] 11 months ago

Patch Changes

  • d84ebbd: responseMessage type has been changed to any, so you can actually return response as anything (i.e. object)
elysia-rate-limit - v2.0.0

Published by github-actions[bot] 11 months ago

Major Changes

  • fc6e385: generator now determine IP address natively via server.requestIP() function. This is a breaking change for those who use Bun version 1.0.3 or below. Please update your code to support Bun version 1.0.4 or above.
elysia-rate-limit - v1.3.0

Published by github-actions[bot] 11 months ago

Minor Changes

  • a5a0b02: bump minimum peer dependency verison of elysia to 0.7.15
elysia-rate-limit - v1.2.0

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 89d308c: securely signed package with provenance
elysia-rate-limit - 1.0.3

Published by rayriffy over 1 year ago

What's new?

  • countFailedRequest to change default plugin behavior
  • context for writing your own custom context (i.e. use database or filesystem to store request count instead of memory)
  • skip function to determine this Request should be counted into rate limiter or not
elysia-rate-limit - 1.0.2

Published by rayriffy over 1 year ago

What's new?

  • First functional release.
Package Rankings
Top 17.42% on Npmjs.org
Badges
Extracted from project README
NPM Version NPM Downloads NPM License
Related Projects