mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-14 13:45:49 +00:00
show how long a user was timed out for in logs
This commit is contained in:
@@ -91,6 +91,7 @@ app.use((req, res, next) => {
|
||||
}
|
||||
else if (rateLimits[ip] > Date.now()) {
|
||||
rateLimits[ip] += allowRequestsEveryMs;
|
||||
console.log(`user ${ip} was timed out for ${(rateLimits[ip] - Date.now()) / 1000}s`);
|
||||
return res.sendStatus(429);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user