Closed virtuman closed 7 years ago
@virtuman
First of all, I don't think it is a good practice to make the dev and prod use the same proxy. It is better to use a different proxy for each environment.
And if you do need that setting, you can set HTTP_BASIC_AUTH
in the haproxy container, and EXCLUDE_BASIC_AUTH=true
in your prod app.
It is not available in the lasted version of dockercloud/haproxy
yet, but the changes are already in the staging branch. We will release this soon.
Is there a way to specify HTTP_BASIC_AUTH during startup of a specific container only? Ie. i want all production sites to be running without HTTP_AUTH, but all dev sites to be automatically protected by HTTP_AUTH, and HTTP AUTH should trigger only if the request is not from white-listed IP address ? That's how we currently have it set up with our own Haproxy, but would like to switch to the use of the dynamic haproxy configuration based on this project.
Thank you.