From f65e4d5ee153e6f8135a9db8c240949a0e9dc8b4 Mon Sep 17 00:00:00 2001 From: Greg Swift Date: Wed, 7 Feb 2018 09:30:59 -0600 Subject: [PATCH] Update icanhazip to return IP supporting X-Forwarded-For headers --- icanhaz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/icanhaz.py b/icanhaz.py index 6bf0934..a918fde 100755 --- a/icanhaz.py +++ b/icanhaz.py @@ -90,7 +90,8 @@ def icanhazafunction(): result = json.dumps(dict(request.headers)) else: # The request is for *.icanhazip.com or something we don't recognize - result = request.remote_addr + #result = request.remote_addr + result = request.access_route[0] return Response("%s\n" % result, mimetype="text/plain", headers={'X-Your-Ip': request.remote_addr})