Changeset 6397
- Timestamp:
- 09/20/07 12:03:14 (1 year ago)
- Files:
-
- django/trunk/django/middleware/http.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/middleware/http.py
r6364 r6397 55 55 return None 56 56 else: 57 # HTTP_X_FORWARDED_FOR can be a comma-separated list of IPs. 58 # Take just the last one. 59 # See http://bob.pythonmac.org/archives/2005/09/23/apache-x-forwarded-for-caveat/ 60 real_ip = real_ip.split(",")[-1].strip() 57 # HTTP_X_FORWARDED_FOR can be a comma-separated list of IPs. The 58 # client's IP will be the first one. 59 real_ip = real_ip.split(",")[0].strip() 61 60 request.META['REMOTE_ADDR'] = real_ip
