From d7b2a183055d25e5614f30a02e6cee1a615d0d86 Mon Sep 17 00:00:00 2001 From: Patrick Hagemeister Date: Fri, 29 Jan 2016 12:44:56 +0100 Subject: [PATCH] Fixes whitelist check when BEHIND_REVERSE_PROXY --- axes/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axes/decorators.py b/axes/decorators.py index da246bd..f474173 100644 --- a/axes/decorators.py +++ b/axes/decorators.py @@ -145,7 +145,7 @@ def get_ip(request): 'to make sure this header value is being passed.'.format(REVERSE_PROXY_HEADER)) else: ip = request.META.get('REMOTE_ADDR', '') - if ip not in IP_WHITELIST: + if not ip_in_whitelist(ip): raise Warning('Axes is configured for operation behind a reverse proxy and to allow some'\ 'IP addresses to have direct access. {0} is not on the white list'.format(ip)) return ip