{"action":"created","issue":{"url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/75","repository_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy","labels_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/75/comments","events_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/75/events","html_url":"https://github.com/vfarcic/docker-flow-proxy/issues/75","id":193679196,"number":75,"title":"Adding HTTP_X_FORWARDED_PROTO in haproxy","user":{"login":"getvivekv","id":914305,"avatar_url":"https://avatars.githubusercontent.com/u/914305?v=3","gravatar_id":"","url":"https://api.github.com/users/getvivekv","html_url":"https://github.com/getvivekv","followers_url":"https://api.github.com/users/getvivekv/followers","following_url":"https://api.github.com/users/getvivekv/following{/other_user}","gists_url":"https://api.github.com/users/getvivekv/gists{/gist_id}","starred_url":"https://api.github.com/users/getvivekv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getvivekv/subscriptions","organizations_url":"https://api.github.com/users/getvivekv/orgs","repos_url":"https://api.github.com/users/getvivekv/repos","events_url":"https://api.github.com/users/getvivekv/events{/privacy}","received_events_url":"https://api.github.com/users/getvivekv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-06T04:14:37Z","updated_at":"2016-12-06T06:08:12Z","closed_at":null,"body":"I was trying to setup docker-flow-proxy with SSL and my backend checks for `HTTP_X_FORWARDED_PROTO` header to determine if the connection is `https` or not and if it is not https it redirects the user to https domain name. However, because the haproxy template doesn't support this out of the box, the script was looping and eventually timed out.\r\n\r\nFinally, I ended up creating new image with a custom haproxy.tmpl file with the extra content \r\n\r\n```\r\nfrontend services\r\n    bind *:80\r\n    bind *:443{{.CertsString}}\r\n    mode http\r\n    option http-server-close\r\n    option forwardfor\r\n    http-request set-header X-Forwarded-Proto https if { ssl_fc }\r\n```\r\n\r\nI want to make a feature request to add the option to add extra headers in the haproxy( may be using a curl call ) so that it is more customizable and users don't have to maintain their own proxy image. \r\n"},"comment":{"url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/comments/265069125","html_url":"https://github.com/vfarcic/docker-flow-proxy/issues/75#issuecomment-265069125","issue_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/75","id":265069125,"user":{"login":"vfarcic","id":5716227,"avatar_url":"https://avatars.githubusercontent.com/u/5716227?v=3","gravatar_id":"","url":"https://api.github.com/users/vfarcic","html_url":"https://github.com/vfarcic","followers_url":"https://api.github.com/users/vfarcic/followers","following_url":"https://api.github.com/users/vfarcic/following{/other_user}","gists_url":"https://api.github.com/users/vfarcic/gists{/gist_id}","starred_url":"https://api.github.com/users/vfarcic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfarcic/subscriptions","organizations_url":"https://api.github.com/users/vfarcic/orgs","repos_url":"https://api.github.com/users/vfarcic/repos","events_url":"https://api.github.com/users/vfarcic/events{/privacy}","received_events_url":"https://api.github.com/users/vfarcic/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T06:08:12Z","updated_at":"2016-12-06T06:08:12Z","body":"I'm thinking on adding a new environment variable called `FRONT_END_SUFFIX`. Whatever would be inside that variable will be added to the end of the frontend section. Multiple lines can be separated with comma (`,`). The proxy would also accept a new PUT request on /api/v1/frontend that would work in the same way as the env. var. FRONT_END_SUFFIX. That way, additional frontend options could be added either by creating the container or later on through HTTP request.\r\n\r\nDo you think that such an approach would work. Any other suggestion is welcome."}}
{"actor":{"display_login":"vfarcic"}}