Closed tuananh closed 5 years ago
add whitelistand blacklist option.
whitelist
blacklist
Fixes: #1 and #2
app = new Koa(); app.use(ratelimit({ db, whitelist: (ctx) => ctx.request.header.foo === 'whitelistme', max: 1 }));
or
app.use(ratelimit({ db, blacklist: (ctx) => ctx.request.header.foo === 'blacklisted', max: 1 }));
@dead-horse @coderhaoxin can you take a look at this?
will review this at this weekend :).
4.2.0
add
whitelist
andblacklist
option.Fixes: #1 and #2
or