Add separate rate limit to invite user

This commit is contained in:
Tuan Dang
2024-04-03 18:46:29 -07:00
parent 5fbfcdda30
commit 1554618167
3 changed files with 11 additions and 5 deletions
+7 -1
View File
@@ -20,7 +20,13 @@ export const globalRateLimiterCfg = (): RateLimitPluginOptions => {
export const authRateLimit: RateLimitOptions = {
timeWindow: 60 * 1000,
max: 600,
max: 60,
keyGenerator: (req) => req.realIp
};
export const inviteUserRateLimit: RateLimitOptions = {
timeWindow: 60 * 1000,
max: 10,
keyGenerator: (req) => req.realIp
};