我在Nginx中使用热链接保护,它工作得很好!
由于某些原因,它不允许访问者使用Firefox浏览我的网站以查看任何图片。
对于使用IE浏览器,Chrome浏览器,Safari浏览器和Opera的访问者来说,它的工作原理很好:图片显示在我的网站上,但是如果您尝试进行热链接,则不会显示。
我在Win和Mac上检查了Firefox,发生在两个地方。 据我所知,由Firefox发送的标题与IE和其他浏览器具有相同的引用。
热链接保护代码看起来像这样
location ~ \.(jpg|jpeg|png|gif|swf)$ { valid_referers server_names blocked *.mysite.com; if ($invalid_referer) { rewrite ^(.*)$ /nopeeking.png break; } } location =/visitpg.png { root /path/to/my/site; }
任何想法为什么这可以在所有其他浏览器,但不在Firefox?