Skip to content

Commit

Permalink
fix(core): Rate limit vs headless
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Apr 26, 2024
1 parent 55fbace commit 0e622d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion allauth/core/ratelimit.py
Expand Up @@ -127,7 +127,7 @@ def _handler429(request):

def consume_or_429(request, *args, **kwargs):
if not consume(request, *args, **kwargs):
if app_settings.HEADLESS_ENABLED and getattr(request.allauth, "headless"):
if app_settings.HEADLESS_ENABLED and hasattr(request.allauth, "headless"):
from allauth.headless.base.response import RateLimitResponse

return RateLimitResponse(request)
Expand Down

0 comments on commit 0e622d3

Please sign in to comment.