mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-17 20:11:08 +00:00
Fixes whitelist check when BEHIND_REVERSE_PROXY
This commit is contained in:
parent
31a54fac00
commit
d7b2a18305
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue