docker-archive / dockercloud-haproxy

HAproxy image that autoreconfigures itself when used in Docker Cloud
https://cloud.docker.com/
651 stars 187 forks source link

Add an ACL for FORCE_SSL situation. #235

Open maskshell opened 6 years ago

maskshell commented 6 years ago

When haproxy behind other load balance proxy, such as Amazon ELB, Aliyun SLB. If you use ELB to terminate the SSL, and the haproxy listen on HTTP only, then it will raises the "ERR_TOO_MANY_REDIRECTS" error.

But the load balancer can pass a additional X-Forwarded-Proto header to haproxy. So, if we add an ACL to process the X-Forwarded-Proto header, then will solve the problem.

Must combine with the global env var "SKIP_FORWARDED_PROTO".

210