Skip to content
New issue

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

Documentation example issue #319

Open
minusf opened this issue May 12, 2024 · 0 comments
Open

Documentation example issue #319

minusf opened this issue May 12, 2024 · 0 comments

Comments

@minusf
Copy link

minusf commented May 12, 2024

The first example comment seems to be only partially correct:
https://github.com/jsocol/django-ratelimit/blob/main/docs/usage.rst?plain=1#L84:

@ratelimit(key='ip', rate='5/m', block=False)
def myview(request):
    # Will be true if the same IP makes more than 5 POST
    # requests/minute.
    was_limited = getattr(request, 'limited', False)
    return HttpResponse()

In my understanding by default method is ALL, so while 5 POSTs will trigger the rate limiting, so would any other request methods.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant