mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-28 00:44:01 +00:00
Get first X-Forwarded-For IP
This commit is contained in:
parent
778f208cc1
commit
5b94c44434
1 changed files with 1 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ def get_ip(request):
|
|||
else:
|
||||
logging.debug('Axes is configured to be behind reverse proxy...looking for header value %s', REVERSE_PROXY_HEADER)
|
||||
ip = request.META.get(REVERSE_PROXY_HEADER, '')
|
||||
ip = ip.split(",", 1)[0].strip()
|
||||
if ip == '':
|
||||
raise Warning('Axes is configured for operation behind a reverse proxy but could not find '\
|
||||
'an HTTP header value {0}. Check your proxy server settings '\
|
||||
|
|
|
|||
Loading…
Reference in a new issue