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-limitrequires one of
- http:connect
- http:fastify
Options
| option | values | default |
|---|---|---|
| algorithm | fixed-window · sliding-window · token-bucket · leaky-bucket | "fixed-window" |
| windowMs | integer | 900000 |
| limit | integer | 100 |
set with --option security-rate-limit.<option>=<value>