-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When lifetime is reset with refreshTimeoutOnRequest? #14
Comments
So basically the lifetime is how long the record of request counts for an IP is kept. If you look at the If you want to manually reset the count (for example because of a successful login) just call Thoughts?
|
So for example, following settings: var genericBruteforce = new ExpressBrute(store, {
freeRetries: 100,
lifetime: 30,
attachResetToRequest: false,
refreshTimeoutOnRequest: false,
});
However if the refreshTimeoutOnRequest set to true, then it will not ban at all (with counter resetting every request)? Or perhaps I misunderstand how lifetime works? |
Almost. You would also want to set If true it would:
|
@AdamPflug Thanks, it's more clear now. Would be great to have these 2 cases described more clearly in doc, e.g.:
The problem imho that the difference is too subtle, perhaps use case examples would help. |
I'm trying to balance keeping the documentation as simple as short as possible with providing enough information. Hopefully rephrasing it makes things a little clearer - if not I've linked to this issue. |
very nice |
|
First of all, thanks for the great module!
From reading the documentation, I'm not very clear when exactly the lifetime is reset with refreshTimeoutOnRequest set to true.
Is it once the lifetime ends a new one starts then?
The text was updated successfully, but these errors were encountered: