I am trying to allow pinterest to access to my dev site's images, currently nginx deny.conf is using auth_basic
and a list of allow IPs. There is no deny all
in there. satisfy any
is also in deny.conf
I added allow all
to my site's config and restarted/reloaded nginx but still getting access denied from pinterest.
location ^~ ^/(cache|media|static)/ {
allow all;
access_log off;
expires 1y;
}
Any ideas?
Try putting satisfy any;
in your configuration. That tells Nginx to accept either HTTP authentication or IP restriction. By default, when you define both, it will expect both.
Allows access if all (all) or at least one (any) of the ngx_http_access_module, ngx_http_auth_basic_module, ngx_http_auth_request_module, or ngx_http_auth_jwt_module modules allow access.
Example:
location / { satisfy any; allow 192.168.1.0/32; deny all; auth_basic "closed site"; auth_basic_user_file conf/htpasswd; }
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With