edit rate limit

This commit is contained in:
MCHost
2025-07-03 01:49:51 -04:00
parent e7d81ad5a3
commit 4710c876a3

View File

@ -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,