feat: add config for rate_limit

This commit is contained in:
tdurieux
2022-09-07 10:39:38 +02:00
parent f22c1ef4f0
commit 30bfae9785
2 changed files with 3 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ export default async function start() {
sendCommand: (...args: string[]) => redisClient.sendCommand(args),
}),
windowMs: 15 * 60 * 1000, // 15 minutes
max: 1000, // limit each IP
max: config.RATE_LIMIT, // limit each IP
standardHeaders: true,
legacyHeaders: false,
// delayMs: 0, // disable delaying - full speed until the max limit is reached