Yeah lets not spam logs
This commit is contained in:
parent
1ad345dbcd
commit
513c49106b
6
index.js
6
index.js
|
@ -358,11 +358,13 @@ 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"]}@${config.behindProxy ? req.headers['x-real-ip'] : req.ip} exceeded rate limit!`);
|
if (!req.rateLimit.remaining) {
|
||||||
|
console.log(`${colors.red(`[ERROR ${new Date()}]`)} ${req.headers["user-agent"]}@${config.behindProxy ? req.headers['x-real-ip'] : req.ip} exceeded rate limit!`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
app.get('/check', (req, res) => {
|
app.get('/check', (req, res) => {
|
||||||
// Check that all required parameters are present
|
// Check that all required parameters are present
|
||||||
if (!req.query.address) {
|
if (!req.query.address) {
|
||||||
|
|
Loading…
Reference in a new issue