docker-archive / dockercloud-haproxy

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

Adds option for turning off basic auth for selected service(s) #154

Closed stevenjack closed 7 years ago

stevenjack commented 7 years ago

Problem

We have a number of services that sit behind our ha-proxy instance (i.e our app, nginx container for static assets) and requests are routed based on the virtual host. We'd like to add basic auth to our staging environment however at the moment HTTP_BASIC_AUTH is a blanket setting that covers all backends. It would be great if we could selectively disable auth being applied to a backend at a service level.

Solution

Add a property that can be applied to a linked service, EXCLUDE_BASIC_AUTH. Once set that service will be excluded from having basic auth applied to it.

tifayuki commented 7 years ago

Merged to staging. Thank you