{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1286","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/1286/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1286/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1286/events","html_url":"https://github.com/spring-cloud/spring-cloud-netflix/issues/1286","id":172676796,"number":1286,"title":"Zuul behind a proxy over HTTPS/SSL sends incorrect headers","user":{"login":"cesartl","id":18382796,"avatar_url":"https://avatars.githubusercontent.com/u/18382796?v=3","gravatar_id":"","url":"https://api.github.com/users/cesartl","html_url":"https://github.com/cesartl","followers_url":"https://api.github.com/users/cesartl/followers","following_url":"https://api.github.com/users/cesartl/following{/other_user}","gists_url":"https://api.github.com/users/cesartl/gists{/gist_id}","starred_url":"https://api.github.com/users/cesartl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesartl/subscriptions","organizations_url":"https://api.github.com/users/cesartl/orgs","repos_url":"https://api.github.com/users/cesartl/repos","events_url":"https://api.github.com/users/cesartl/events{/privacy}","received_events_url":"https://api.github.com/users/cesartl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-23T11:36:42Z","updated_at":"2016-08-31T15:35:42Z","closed_at":null,"body":"I have an AWS `Elastic Load Balancer` with the certificates for my domain and which terminates the `SSL` traffic. The `ELB` has a listener on the `https` port and forwards it as `http` to `Zuul`.\r\n\r\nWhen I use `Spring Boot HATEOAS`, Zuul will replace the links with the correct address but with `http` instead of `https`:\r\n\r\n    \"_links\": {\r\n      \"self\": {\r\n        \"href\": \"http://my.domain.com:80/rest/foo/bar\"\r\n      }\r\n    }\r\n\r\nbut what I want is:\r\n\r\n    \"_links\": {\r\n      \"self\": {\r\n        \"href\": \"https://my.domain.com/rest/foo/bar\"\r\n      }\r\n    }\r\n\r\nThe request that generates this response is made over `https`\r\n\r\nBecause `Zuul` is behind the ELB I'm guessing it cannot know that it should receive traffic through https.\r\n\r\nIs there a way to tell `Zuul` to replace links with `https` even though it receives un-encrypted traffic through `http`?\r\n\r\nI guess an alternative is to deploy `Zuul` with `https` with a self-signed certificate but I'd rather ovoid this complication if I can.\r\n\r\nI checked the headers forwarded by my ELB:\r\n\r\n    'host': 'my.domain.com'\r\n    'x-forwarded-proto': 'https'\r\n\r\nShouldn't the HATEOAS module pick these headers up to reconstruct the request?\r\n\r\nPS: Tried with Spring Cloud BRIXTON.SR4"},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/comments/243804075","html_url":"https://github.com/spring-cloud/spring-cloud-netflix/issues/1286#issuecomment-243804075","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/1286","id":243804075,"user":{"login":"cesartl","id":18382796,"avatar_url":"https://avatars.githubusercontent.com/u/18382796?v=3","gravatar_id":"","url":"https://api.github.com/users/cesartl","html_url":"https://github.com/cesartl","followers_url":"https://api.github.com/users/cesartl/followers","following_url":"https://api.github.com/users/cesartl/following{/other_user}","gists_url":"https://api.github.com/users/cesartl/gists{/gist_id}","starred_url":"https://api.github.com/users/cesartl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesartl/subscriptions","organizations_url":"https://api.github.com/users/cesartl/orgs","repos_url":"https://api.github.com/users/cesartl/repos","events_url":"https://api.github.com/users/cesartl/events{/privacy}","received_events_url":"https://api.github.com/users/cesartl/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T15:35:42Z","updated_at":"2016-08-31T15:35:42Z","body":"ok that makes sense.\r\n\r\nNo they are not duplicated sorry. So that looks good."}}
{"actor":{"display_login":"cesartl"}}