Basic rate-limiting middleware for the Express web server
OTHER License
Bot releases are visible (Hide)
Published by github-actions[bot] about 2 years ago
Published by github-actions[bot] over 2 years ago
5.0.0-beta.1
) as a supported peer dependency (#304)Published by github-actions[bot] over 2 years ago
es2019
so that ESBuild outputs code that can run with Node 12.Published by github-actions[bot] over 2 years ago
undefined
is passed to the ratePublished by github-actions[bot] over 2 years ago
MemoryStore
, so it can now be imported as a named importimport { MemoryStore } from 'express-rate-limit'
).onLimitReached
option (this was supposed to be deprecated inPublished by github-actions[bot] almost 3 years ago
rateLimit
in case the default import does not work.default
, so Typescript CommonJS developers can default-import the library (import rateLimit from 'express-rate-limit'
).Published by github-actions[bot] almost 3 years ago
esModuleInterop
flag in their Typescript compiler configuration.Published by github-actions[bot] almost 3 years ago
.tgz
to GitHub releases. main
and module
fields to package.json
. This helps tools such as ESLint that do not yet support the exports
field.package-lock.json
to match package.json
Published by github-actions[bot] almost 3 years ago
??
), which isn't supported in Node prior to 14.x.Published by github-actions[bot] almost 3 years ago
js-cjs
, js-esm
, ts-cjs
, ts-esm
environments.redis
, mongo
, memcached
, precise
).esbuild
to generate ESM and CJS output. This reduces the size of the built package from 138 kb to 13kb and build time to 4 ms! 🚀dts-bundle-generator
to generate a single Typescript declaration file.Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
express
4.x as a peer dependency..tgz
file) on GitHub releases as well as the npm registry.draft_polli_ratelimit_headers
option to standardHeaders
.headers
option to legacyHeaders
.Retry-After
header is now sent if either legacyHeaders
or standardHeaders
is set.keyGenerator
to be an async function/return a promise.init
method for stores to set themselves up using options passed to the middleware.incr
method to increment
.increment
, decrement
, resetKey
and resetAll
methods to return a promise.onLimitReached
configuration option is now deprecated. Replace it with a custom handler
that checks the number of hits.limiter.resetIp
method (use the limiter.resetKey
method instead).delayMs
, delayAfter
(the delay functionality was moved to the express-slow-down
package) and global
(use a key generator that returns a constant value).