Ticket #3872: patch.git.diff
File patch.git.diff, 525 bytes (added by , 16 years ago) |
---|
-
django/middleware/http.py
diff --git a/django/middleware/http.py b/django/middleware/http.py index 53b65c1..f550f57 100644
a b class SetRemoteAddrFromForwardedFor(object): 51 51 else: 52 52 # HTTP_X_FORWARDED_FOR can be a comma-separated list of IPs. The 53 53 # client's IP will be the first one. 54 real_ip = real_ip.split(",")[ 0].strip()54 real_ip = real_ip.split(",")[-2].strip() 55 55 request.META['REMOTE_ADDR'] = real_ip