diff --git a/config/ratelimit.py b/config/ratelimit.py index 4d59c8dcf3..435076c726 100644 --- a/config/ratelimit.py +++ b/config/ratelimit.py @@ -21,6 +21,7 @@ def validatecaptcha(request): return False +# refer https://django-ratelimit.readthedocs.io/en/stable/rates.html for rate def ratelimit( request, group="", keys=[None], rate=settings.DJANGO_RATE_LIMIT, increment=True ): diff --git a/config/settings/base.py b/config/settings/base.py index 9f3db9e747..e5e1976226 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -324,6 +324,7 @@ def GETKEY(group, request): return "ratelimit" +# https://django-ratelimit.readthedocs.io/en/stable/rates.html DJANGO_RATE_LIMIT = env("RATE_LIMIT", default="5/10m") GOOGLE_RECAPTCHA_SECRET_KEY = env("GOOGLE_RECAPTCHA_SECRET_KEY", default="")