{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/BasicMiddleware/issues/190","repository_url":"https://api.github.com/repos/aspnet/BasicMiddleware","labels_url":"https://api.github.com/repos/aspnet/BasicMiddleware/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/BasicMiddleware/issues/190/comments","events_url":"https://api.github.com/repos/aspnet/BasicMiddleware/issues/190/events","html_url":"https://github.com/aspnet/BasicMiddleware/issues/190","id":195048432,"number":190,"title":"RemoteIpAddress and X-Forwarded-For","user":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars3.githubusercontent.com/u/1821173?v=4","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"labels":[{"id":247558658,"url":"https://api.github.com/repos/aspnet/BasicMiddleware/labels/3%20-%20Done","name":"3 - Done","color":"CCCCCC","default":false},{"id":228977616,"url":"https://api.github.com/repos/aspnet/BasicMiddleware/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars3.githubusercontent.com/u/1821173?v=4","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"assignees":[{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars3.githubusercontent.com/u/1821173?v=4","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/aspnet/BasicMiddleware/milestones/8","html_url":"https://github.com/aspnet/BasicMiddleware/milestone/8","labels_url":"https://api.github.com/repos/aspnet/BasicMiddleware/milestones/8/labels","id":2025242,"number":8,"title":"2.0.0-preview1","description":"","creator":{"login":"muratg","id":1808428,"avatar_url":"https://avatars3.githubusercontent.com/u/1808428?v=4","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":7,"state":"closed","created_at":"2016-09-23T20:33:21Z","updated_at":"2017-05-11T22:52:35Z","due_on":null,"closed_at":"2017-05-11T22:52:35Z"},"comments":22,"created_at":"2016-12-12T18:24:58Z","updated_at":"2017-09-29T17:34:58Z","closed_at":"2017-04-22T02:02:34Z","author_association":"MEMBER","body":"_From @JauernigIT on December 12, 2016 12:54_\n\nWe struggled for some time now to find a way to reliable find out the client IP address in ASP.NET Core...\r\n- Environment: Windows Server 2008 R2, IIS 7.5, ASP.NET Core 1.0.0 (still)\r\n- Requirement: it should work with direct callers as well as with clients that come over a corporate proxy.\r\n\r\nFirst we activated `UseIISIntegration()` and `app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor })` in the startup phase.\r\n\r\nThen we thought that we could use `httpContext.Connection.RemoteIpAddress` for this scenario and yes, it works when we have direct callers - in this case it returns the right client IP... But: unfortunately it doesn't work when the client is behind our corporate proxy. In this case, `Connection.RemoteIpAddress` everytime returns `127.0.0.1`.\r\n\r\nDoing some more investigation we found out that the `X-Forwarded-For` request header was correctly set for clients that come over the proxy: `X-Forwarded-For: <client-ip>, 127.0.0.1, <proxy-ip:port>`. Hence, we are able to _manually_ grab the right client IP from the request. But we thought that `httpContext.Connection.RemoteIpAddress` is exactly doing this for us?\n\n_Copied from original issue: aspnet/HttpAbstractions#742_"},"comment":{"url":"https://api.github.com/repos/aspnet/BasicMiddleware/issues/comments/333189765","html_url":"https://github.com/aspnet/BasicMiddleware/issues/190#issuecomment-333189765","issue_url":"https://api.github.com/repos/aspnet/BasicMiddleware/issues/190","id":333189765,"user":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars3.githubusercontent.com/u/1821173?v=4","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"created_at":"2017-09-29T17:34:58Z","updated_at":"2017-09-29T17:34:58Z","author_association":"MEMBER","body":"For 2.0 the restrictions were eased to address some common scenarios. Are you still having trouble on 2.0?"}}
{"actor":{"display_login":"Tratcher"}}