add ratelimit to error code list

This commit is contained in:
Mystikfluu
2022-09-10 17:35:51 +02:00
parent a763bde1f8
commit 21cfc8218b
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -295,6 +295,7 @@ function increaseIndividualCall(url, req) {
}
INDIVIDUAL_CALLS[ip][url]++;
if (INDIVIDUAL_CALLS[ip][url] >= conf["max"]) {
res.status(429)
console.log(5, "ratelimiting someone on", url, INDIVIDUAL_CALLS[ip][url], conf["max"]);
return false;
}