Added rate limiting logging and an error page for hitting the rate limit on opening characters

This commit is contained in:
Thaum Rystra
2018-04-02 14:26:55 +02:00
parent 164ba78c81
commit 742b26b0de
6 changed files with 79 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
logRateError = function(reply, ruleInput){
// reply = {allowed, timeToReset, numInvocationsLeft}
// ruleInput = {userId, clientAddress, type, name, connectionId}
console.log(
`Limit hit for ${ruleInput.type} "${ruleInput.name}" ` +
`by user ${ruleInput.userId} from ${ruleInput.clientAddress}`
);
}