From aea8a0cfd852f528738881c25a83d7daef4e222d Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 26 May 2026 16:42:57 +0200 Subject: [PATCH] Make ip block work in dev --- src/pretix/helpers/ratelimit.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pretix/helpers/ratelimit.py b/src/pretix/helpers/ratelimit.py index 6e9e29eae4..45e8b66501 100644 --- a/src/pretix/helpers/ratelimit.py +++ b/src/pretix/helpers/ratelimit.py @@ -36,8 +36,6 @@ def _get_key(key, parameters): def _get_ip(request): - if not settings.HAS_REDIS: - return None client_ip = get_client_ip(request) if not client_ip: return None @@ -46,7 +44,7 @@ def _get_ip(request): except ValueError: # Web server not set up correctly return None - if client_ip.is_private: + if client_ip.is_private and not settings.DEBUG: # This is the private IP of the server, web server not set up correctly return None return str(client_ip)