{"action":"opened","issue":{"url":"https://api.github.com/repos/thinkopensolutions/tkobr-addons/issues/26","labels_url":"https://api.github.com/repos/thinkopensolutions/tkobr-addons/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/thinkopensolutions/tkobr-addons/issues/26/comments","events_url":"https://api.github.com/repos/thinkopensolutions/tkobr-addons/issues/26/events","html_url":"https://github.com/thinkopensolutions/tkobr-addons/issues/26","id":129735998,"number":26,"title":"Problem with IP Request with apache proxy","user":{"login":"acysos","id":1657112,"avatar_url":"https://avatars.githubusercontent.com/u/1657112?v=3","gravatar_id":"","url":"https://api.github.com/users/acysos","html_url":"https://github.com/acysos","followers_url":"https://api.github.com/users/acysos/followers","following_url":"https://api.github.com/users/acysos/following{/other_user}","gists_url":"https://api.github.com/users/acysos/gists{/gist_id}","starred_url":"https://api.github.com/users/acysos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acysos/subscriptions","organizations_url":"https://api.github.com/users/acysos/orgs","repos_url":"https://api.github.com/users/acysos/repos","events_url":"https://api.github.com/users/acysos/events{/privacy}","received_events_url":"https://api.github.com/users/acysos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-29T11:14:36Z","updated_at":"2016-01-29T11:14:36Z","closed_at":null,"body":"Hello,\r\n\r\nI have detected other problem. When you use Apache Proxy, always return 127.0.0.1. I have solved with this code. \r\n\r\n`    ip = request.httprequest.headers.environ['REMOTE_ADDR']\r\n        if ip == '127.0.0.1' or ip == 'localhost':\r\n            ip = load(urlopen('https://api.ipify.org/?format=json'))['ip']`\r\n\r\n`        if geo_ip_resolver:\r\n            ip_location = (str(geo_ip_resolver.country_name_by_addr(\r\n                ip)) or \"\")`\r\n\r\nI know that is because I use a proxy, do you want that I send a PR with this change?\r\n\r\nGreetings"}}