nginx 允许所有不起作用

Jam*_*Lin 3 configuration nginx

我试图允许 pinterest 访问我的开发站点的图像,目前 nginx Deny.conf 正在使用auth_basic和允许 IP 列表。deny all里面没有。satisfy any也在deny.conf中

我添加allow all到站点的配置并重新启动/重新加载 nginx,但仍然被 pinterest 拒绝访问。

location ^~ ^/(cache|media|static)/ {
        allow all;
        access_log off;
        expires 1y;
    }
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

小智 5

尝试输入satisfy any;您的配置。这告诉 nginx 接受 http 身份验证或 IP 限制。默认情况下,当您定义两者时,它会期望两者。

http://wiki.nginx.org/HttpCoreModule#satisfy