Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
Update icanhazip to return IP supporting X-Forwarded-For headers
Browse files Browse the repository at this point in the history
  • Loading branch information
gregswift committed Feb 7, 2018
1 parent c0ea0b6 commit f65e4d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion icanhaz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})


Expand Down

0 comments on commit f65e4d5

Please sign in to comment.