We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 613290a commit f89fc24Copy full SHA for f89fc24
readthedocs/analytics/utils.py
@@ -32,7 +32,7 @@ def get_client_ip(request):
32
client_ip = x_forwarded_for.split(',')[0].strip()
33
34
# Removing the port number (if present)
35
- client_ip = x_forwarded_for.rsplit(':')[0]
+ client_ip = client_ip.rsplit(':')[0]
36
else:
37
client_ip = request.META.get('REMOTE_ADDR', None)
38
0 commit comments