show how long a user was timed out for in logs
This commit is contained in:
parent
39fe1dc184
commit
bbc615150c
@ -91,6 +91,7 @@ app.use((req, res, next) => {
|
|||||||
}
|
}
|
||||||
else if (rateLimits[ip] > Date.now()) {
|
else if (rateLimits[ip] > Date.now()) {
|
||||||
rateLimits[ip] += allowRequestsEveryMs;
|
rateLimits[ip] += allowRequestsEveryMs;
|
||||||
|
console.log(`user ${ip} was timed out for ${(rateLimits[ip] - Date.now()) / 1000}s`);
|
||||||
return res.sendStatus(429);
|
return res.sendStatus(429);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user