{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1807","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1807/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1807/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1807/events","html_url":"https://github.com/spring-cloud/spring-cloud-netflix/issues/1807","id":216814196,"number":1807,"title":"Separate adding X-Forwarded-Port header","user":{"login":"gonzalad","id":777485,"avatar_url":"https://avatars3.githubusercontent.com/u/777485?v=3","gravatar_id":"","url":"https://api.github.com/users/gonzalad","html_url":"https://github.com/gonzalad","followers_url":"https://api.github.com/users/gonzalad/followers","following_url":"https://api.github.com/users/gonzalad/following{/other_user}","gists_url":"https://api.github.com/users/gonzalad/gists{/gist_id}","starred_url":"https://api.github.com/users/gonzalad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonzalad/subscriptions","organizations_url":"https://api.github.com/users/gonzalad/orgs","repos_url":"https://api.github.com/users/gonzalad/repos","events_url":"https://api.github.com/users/gonzalad/events{/privacy}","received_events_url":"https://api.github.com/users/gonzalad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-24T15:08:25Z","updated_at":"2017-04-10T19:37:44Z","closed_at":null,"body":"Similar to #1656 \r\nAdd X-Forwarded-Port header in Zuul PreDecorationFilter even with X-Forwarded-Host header being absent.\r\n\r\nIn my case I deployed my Zuul Proxy gateway behind a Amazon ALBv2.\r\n\r\nIn my zuul proxy, I receive the following request : \r\n```\r\nGET /swagger/scim/v2/api-docs\r\nX-Forwarded-For: 10.10.10.10.\r\nX-Forwarded-Proto: https.\r\nX-Forwarded-Port: 443.\r\nHost: front-host.com.\r\nX-Amzn-Trace-Id: Root=blabla\r\ncache-control: max-age=0.\r\nupgrade-insecure-requests: 1.\r\nuser-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/56.0.2924.76 Chrome/56.0.2924.76 Safari/537.36.\r\naccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8.\r\naccept-encoding: gzip, deflate, sdch, br.\r\naccept-language: en-US,en;q=0.8,fr;q=0.6,es;q=0.4,it;q=0.2.\r\n```\r\n\r\nAs you can see, there's no X-Forwarded-Host.\r\nIn the current code, X-Forwarded-Port is added only if there's a X-Forwarded-Host present.\r\n\r\nhttps://github.com/spring-cloud/spring-cloud-netflix/blob/675e4c1031b275af877938c02d5950c91f7fe660/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre/PreDecorationFilter.java#L199\r\n\r\nIn my case, my Zuul proxy forwards a request containing :\r\n```\r\nx-forwarded-port: 80\r\n```\r\nWhile I would expect it to send a \r\n```\r\nx-forwarded-port: 443,80\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/comments/293056054","html_url":"https://github.com/spring-cloud/spring-cloud-netflix/issues/1807#issuecomment-293056054","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1807","id":293056054,"user":{"login":"michelzanini","id":4479787,"avatar_url":"https://avatars1.githubusercontent.com/u/4479787?v=3","gravatar_id":"","url":"https://api.github.com/users/michelzanini","html_url":"https://github.com/michelzanini","followers_url":"https://api.github.com/users/michelzanini/followers","following_url":"https://api.github.com/users/michelzanini/following{/other_user}","gists_url":"https://api.github.com/users/michelzanini/gists{/gist_id}","starred_url":"https://api.github.com/users/michelzanini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michelzanini/subscriptions","organizations_url":"https://api.github.com/users/michelzanini/orgs","repos_url":"https://api.github.com/users/michelzanini/repos","events_url":"https://api.github.com/users/michelzanini/events{/privacy}","received_events_url":"https://api.github.com/users/michelzanini/received_events","type":"User","site_admin":false},"created_at":"2017-04-10T19:37:44Z","updated_at":"2017-04-10T19:37:44Z","body":"Thanks @gonzalad. Hopefully this will make into next SR release =]"}}
{"actor":{"display_login":"michelzanini"}}