-
Notifications
You must be signed in to change notification settings - Fork 190
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
Rate limit based on session ID #56
Comments
You can write your own method to use the session ID as the ratelimit key. Ratelimiting by session ID provides too little utility to be in the core.
(Yes, it's possible to spoof IP addresses, but if someone is going to that trouble you have to assume they're willing to ignore session cookies, too.) I use ratelimit on a site that gets a lot of traffic from schools, who are probably the biggest NAT offenders. This is exactly why ratelimit's default is not to block requests, but to annotate them so you could, e.g., require a captcha. I also mention NAT in the Security Considerations section of the docs. |
What's your strategy to reset ratelimit after captcha is successful ? A view may have more than one ratelimiters, how do you know which one should be reset after the captcha. 1 way is to put the cache key as a |
Honestly my strategy is to fix #36. |
I could not find any discussion in the issues on support of session ID for ratelimiting. Wouldn't it be a more suitable parameter rather than IP address. This would especially be useful for visitors that share a common IP address e.g. a corporation.
The text was updated successfully, but these errors were encountered: