We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
i.e. something like a change to core.is_ratelimited as follows:
core.is_ratelimited
def is_ratelimited(request, group=None, fn=None, key=None, rate=None, method=ratelimit.ALL, increment=False): usage = ratelimit.core.get_usage(request, group, fn, key, rate, method, increment) if usage is None: return False # patching begins... attaching the key data to the request object if usage["should_limit"]: request.django_ratelimit_data = { "group": group, "fn_name": fn.__name__ if fn is not None else None, "count": usage["count"], "limit": usage["limit"], } return usage["should_limit"]
Is there any reason why you didn't do this? It would help a lot for logging and figuring out what's actually going on with users.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i.e. something like a change to
core.is_ratelimited
as follows:Is there any reason why you didn't do this? It would help a lot for logging and figuring out what's actually going on with users.
The text was updated successfully, but these errors were encountered: