Skip to content
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

What ip or users are blocked ? #210

Open
liamrabetian opened this issue Nov 1, 2020 · 2 comments
Open

What ip or users are blocked ? #210

liamrabetian opened this issue Nov 1, 2020 · 2 comments

Comments

@liamrabetian
Copy link

I want to check what ip or users (any given key) has exceeded the ratelimit on my apis. I would have liked if django-ratelimit had that option -> for example a function which returns blocked ips, remaining block time as a dictionory.

I would like to work on it and send a PR. Is that ok ?

@jsocol
Copy link
Owner

jsocol commented Nov 1, 2020

Paraphrasing just so I’m sure I got you: you want some way to list the users who are currently over their rate limit, right?

That’s definitely an interesting but of functionality. How are you thinking of implementing it? Because of how ratelimit works internally, there’s no list you can easily query (it relies on one-way hash functions with periodically changing inputs, and this is important for both speed and security).

I can definitely also see wanting to know which users had historically exceeded the limits, not just current.

@liamrabetian
Copy link
Author

Exactly! I wanted to make sure you have a positive opinion about this. Now I'm gonna think about it and come up with a solution in a day or two.
I figure it's easier to just show you in code and have a discussion on it rather than to describe how I'm gonna implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants