André Amorim

Crafting Web Experiences

//

basic auth

Go back to /notes?

  • NGINX Conditional Basic Auth

    You can use map block to get an auth_basic directive argument from the $host variable value: You can use regex expressions with the map directive using ~ modifier, for example: Reference: https://stackoverflow.com/a/69538528