I wrote a simple file browser app which is served using node on port 3000. I use nginx as a front-end which proxies this service. This is on my home server.
I would like to be able to require basic HTTP authentication when I'm accessing it over my public IP, but not when I'm at home. I have this configuration:
location /files {
satisfy any;
allow 10.1.0.0/24;
deny all;
auth_basic "Authentication Required";
auth_basic_user_file /etc/access_list;
proxy_pass http://127.0.0.1:3000/;
}
However, this isn't working. When I'm on my home network on the same subnet, it is still requiring me to do the basic HTTP authentication. I had thought the order "allow > deny > auth" paired with "satisfy any" is correct. Am I doing anything wrong here? Is this possible?