nginx: auth_basic for everything except a specific location

后端 未结 4 1910
再見小時候
再見小時候 2021-02-05 04:03

How can I enable HTTP Basic Auth for everything except for a certain file?

Here is my current server block configuration for the location:

locat         


        
4条回答
  •  长发绾君心
    2021-02-05 04:59

    Try to use sign = , that helps you:

    location = /README {
           auth_basic off;
           allow all; # Allow all to see content 
    }
    

提交回复
热议问题