Added rate limiting logging and an error page for hitting the rate limit on opening characters
This commit is contained in:
8
rpg-docs/server/lib/logRateError.js
Normal file
8
rpg-docs/server/lib/logRateError.js
Normal 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}`
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user