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
Is_ratelimited is a great function, but the name is quite missleading for incrementing. You'd expect it only to be a boolean, but yet it can also increment.
That's great, but I feel we should have also a new function like increment_ratelimit or some sort of increment function which is just a function rather than decorator, that allows you to increment whenever.
At the moment I want to only increment the ratelimit when the user does an unsuccessful login attempt. So i have
I'll try and make some code snippets and let you know how it goes, I'll create a PR if I think it works.
Or would you like me to create a blank/draft PR so that somebody else could add this?
I wasn't planning on adding it myself, was more of a suggestion, but i'm happy to attempt it
Hey,
Is_ratelimited
is a great function, but the name is quite missleading for incrementing. You'd expect it only to be a boolean, but yet it can also increment.That's great, but I feel we should have also a new function like
increment_ratelimit
or some sort ofincrement
function which is just a function rather than decorator, that allows you to increment whenever.At the moment I want to only increment the ratelimit when the user does an unsuccessful login attempt. So i have
But instead of that, i'd quite like something like:
Instead i've created my own function that just does the same thing, but it'd be nice to see this in the official version.
Or I may have just missed it 🤷♂️
Happy to hear opinions, let me know if i'm just being blind :)
The text was updated successfully, but these errors were encountered: