edit rate limit
This commit is contained in:
@ -37,7 +37,7 @@ const limiter = rateLimit({
|
||||
legacyHeaders: false, // Disable X-RateLimit headers
|
||||
keyGenerator: getClientIp, // Use CF-Connecting-IP or fallback to req.ip
|
||||
handler: (req, res) => {
|
||||
const retryAfter = Math.pow(2, Math.min(req.rateLimit.current - req.rateLimit.limit, 5));
|
||||
const retryAfter = Math.pow(2, Math.min(req.rateLimit.current - req.rateLimit.limit));
|
||||
logger.warn('Rate limit exceeded', {
|
||||
ip: getClientIp(req),
|
||||
url: req.url,
|
||||
|
Reference in New Issue
Block a user