express-brute
express-brute copied to clipboard
Implementation Question
I had a question regarding my implementation, and I was wondering if what I am experiencing is a result of bad configuration on my part.
Essentially, I am trying to limit requests of a particular route to 20 requests every 10 seconds. My thinking was that if the maxWait
and the lifetime
were both set to 10seconds
then the freeRetries
counter would reset every 10 seconds. Allowing users to once again request up to 20 times before having to wait.
Is this correct?
const bruteForce = new expressBrute(store, {
freeRetries: 20,
minWait: 5000, // 5s
maxWait: 10000, // 10s
lifetime: 10, // 10s,
})