Fix rate limit logging

This commit is contained in:
Christopher Cookman 2023-01-01 20:04:31 -07:00
parent b878e51994
commit 1ad345dbcd
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -358,7 +358,7 @@ if (config.rateLimiterEnabled) {
message: `You have exceeded the rate limit. Please try again in ${remainingTime} seconds.`, message: `You have exceeded the rate limit. Please try again in ${remainingTime} seconds.`,
remainingTime: remainingTime remainingTime: remainingTime
}); });
console.log(`${colors.red(`[ERROR ${new Date()}]`)} ${req.headers["user-agent"]}@${req.ip} exceeded rate limit!`); console.log(`${colors.red(`[ERROR ${new Date()}]`)} ${req.headers["user-agent"]}@${config.behindProxy ? req.headers['x-real-ip'] : req.ip} exceeded rate limit!`);
} }
})); }));