mirror of
https://github.com/jazzband/django-defender.git
synced 2026-03-16 22:10:32 +00:00
bumped the django versions on travis, and added a fix to get_ip()
This commit is contained in:
parent
fd4f58a20c
commit
ea7a8cde06
2 changed files with 4 additions and 4 deletions
|
|
@ -8,8 +8,8 @@ python:
|
|||
- "pypy"
|
||||
|
||||
env:
|
||||
- DJANGO=Django==1.6.9
|
||||
- DJANGO=Django==1.7.2
|
||||
- DJANGO=Django==1.6.10
|
||||
- DJANGO=Django==1.7.5
|
||||
|
||||
services:
|
||||
- redis-server
|
||||
|
|
@ -28,7 +28,7 @@ script:
|
|||
matrix:
|
||||
exclude:
|
||||
- python: "2.6"
|
||||
env: DJANGO=Django==1.7.2
|
||||
env: DJANGO=Django==1.7.5
|
||||
|
||||
after_success:
|
||||
- coveralls --verbose
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ def get_ip(request):
|
|||
ip = request.META.get(config.REVERSE_PROXY_HEADER, '')
|
||||
ip = ip.split(",", 1)[0].strip()
|
||||
if ip == '':
|
||||
ip = request.META.get('REMOTE_ADDR', '')
|
||||
ip = get_ip_address_from_request(request)
|
||||
else:
|
||||
ip = get_ip_address_from_request(request)
|
||||
return ip
|
||||
|
|
|
|||
Loading…
Reference in a new issue