← modules / security

Rate limiting

security-rate-limit

API rate limiting for Express or NestJS: fixed window, sliding window, token or leaky bucket

add it to a devstack project

npx create-devstack-app add security-rate-limit

requires one of

  • http:connect
  • http:fastify

Options

optionvaluesdefault
algorithmfixed-window · sliding-window · token-bucket · leaky-bucket"fixed-window"
windowMsinteger900000
limitinteger100

set with --option security-rate-limit.<option>=<value>