Analog satisfy any nginx in caddy

Hello everyone,
is there an opportunity to configure an analogue of the behavior of the option to

satisfy any;

how in nginx?

In nginx I have a configuration:

location / {
satisfy any;
allow 192.168.0.0/16;
allow 172.16.0.0/12;
allow 10.0.0.0/8;
deny all;
auth_basic “close_site”;
auth_basic_user_file “/etc/nginx/conf.d/close_site.htpasswd”;
}

but in caddy it doesn’t work, I get 403 anyway:

domain {
ipfilter / {
rule allow
ip 192.168.0.0/16
ip 172.16.0.0/12
ip 10.0.0.0/8
}
basicauth / “admin” “admin”
}
}

Hi @jidckii, welcome to the Caddy community!

What does satisfy any; actually do?

Here is exactly the same problem described. I need that basicauth worked only for non allowed networks.

I read the first post. You want to know if you can replicate the behaviour of satisfy any; in Caddy. I was asking if you could explain what that behaviour is, so that I might be able to tell you if Caddy has an equivalent.

Sorry, I copied the link incorrectly)
A similar problem is described here.


And as I understand it here:

I understand at the moment it is impossible that
basicauth only worked for not allowed ip / subnets

I think my previous response in the linked thread still holds:

Within one site definition, the basicauth and the ipfilter will always both apply; it’s not possible to let either/or access the site. Hence the need to use two sites (on subdomains, maybe?), and redirect between them as necessary for convenience sake.