You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From experimentation I would say that duration is mostly clear, but could be improved from:
Number of seconds before consumed points are reset.
To something like:
Number of seconds before consumed points are reset, starting from the time of the first consumed point on a key. (ie: How long to remember points for a key after the first consumption of/on it.)
But mainly I would consider revising blockduration to say something like:
While duration will cause the points to be remembered for the given interval after the first consumption of a key, and block when all points are consumed until it is reset after an interval given by the duration, blockduration will cause the reset to happen sooner once a key is actually blocked.
Maybe these suggested changes are not perfect, ideal or even suitable either, but I found myself confused by the docs as written, and it was only by modifying a working version of the example at https://github.com/animir/node-rate-limiter-flexible/wiki/Overall-example#login-endpoint-protection to have much shorter duration and blockduration that I was able to deduce what they were really doing. I figured that if I had some trouble with this, then others might also, so I would leave behind a note about it, and make a suggestion for improvement.
The text was updated successfully, but these errors were encountered:
My apologies for not replying 2 weeks ago. I only now saw the notifications last night in my inbox with it being marked complete. Looking at it now it seems clear, but I would need to refresh my memory with some tests to be sure I am not mistaken. I trust your judgement on the correction though, as it seems much clearer than before and I am sure you understand the internal functionality better than I do in terms of it being an accurate description.
I don't know if it is just me, but I found the documentation for blockduration to be very unclear as written at: https://github.com/animir/node-rate-limiter-flexible/wiki/Options#blockduration
From experimentation I would say that duration is mostly clear, but could be improved from:
To something like:
But mainly I would consider revising blockduration to say something like:
Maybe these suggested changes are not perfect, ideal or even suitable either, but I found myself confused by the docs as written, and it was only by modifying a working version of the example at https://github.com/animir/node-rate-limiter-flexible/wiki/Overall-example#login-endpoint-protection to have much shorter duration and blockduration that I was able to deduce what they were really doing. I figured that if I had some trouble with this, then others might also, so I would leave behind a note about it, and make a suggestion for improvement.
The text was updated successfully, but these errors were encountered: