use custom rate limit key generator due to cf changes
This commit is contained in:
@@ -12,7 +12,8 @@ const router = getRouter({ ...addonInterface, manifest: manifest() });
|
||||
const limiter = rateLimit({
|
||||
windowMs: 60 * 60 * 1000, // 1 hours
|
||||
max: 300, // limit each IP to 300 requests per windowMs
|
||||
headers: false
|
||||
headers: false,
|
||||
keyGenerator: (req) => requestIp.getClientIp(req)
|
||||
});
|
||||
|
||||
router.use(limiter);
|
||||
|
||||
Reference in New Issue
Block a user