I'm looking to add some whitelist options, I see the whitelist/blacklist properties in the source code from the PR but because there's not a definitive indication that it can be/should be used, that suggests to me that it could change in any patch version without notice.
More specifically I'm trying to use the whitelist to NOT rate limit requests that return true from the whitelist method.
Is it just a matter of adding it to the ReadMe? If so, I'm happy to open a PR.
Example trying to use:
app.use(ratelimit({
db: new Redis(),
duration: 60000,
errorMessage: 'Sometimes You Just Have to Slow Down.',
id: (ctx) => ctx.ip,
max: 100,
disableHeader: false,
whitelist: (ctx) => {
// some logic that returns a boolean
}
}));
I'm looking to add some whitelist options, I see the whitelist/blacklist properties in the source code from the PR but because there's not a definitive indication that it can be/should be used, that suggests to me that it could change in any patch version without notice.
More specifically I'm trying to use the whitelist to NOT rate limit requests that return true from the whitelist method.
Is it just a matter of adding it to the ReadMe? If so, I'm happy to open a PR. Example trying to use: