dockercloud-haproxy
dockercloud-haproxy copied to clipboard
Basic auth on a single service?
The HTTP_BASIC_AUTH
variable only applies at the global level. Is it possible to require authentication for just a specific service without setting it globally and excluding every other service?
I haven't tested but looking at their docs it says:
Global and default settings of HAProxy
HTTP_BASIC_AUTH -> a comma-separated list of credentials(
Settings in linked application services EXCLUDE_BASIC_AUTH -> if set(any value) and HTTP_BASIC_AUTH global setting is set, no basic auth will be applied to this service.
Given that information I assume you apply HTTP_BASIC_AUTH
on all services, but you explicitly remove authentication using EXCLUDE_BASIC_AUTH
on each of your service.
The way @roks0n suggests works perfectly fine, I am using it this way currently. I think this issue can be closed