我一直在尝试遵循以下规则:https://varnish-cache.org/trac/wiki/VCLExampleAvoidHotlinking
并包含多个引荐来源网址,例如:
if (req.http.host == "example.com" &&
req.url ~ "^/wp-content/uploads/" &&
(req.http.referer && req.http.referer !~ "^http://example.com/" && req.http.referer !~ "^http://twitter.com/" && req.http.referer !~ "^http://linkedin.com/" && req.http.referer !~ "^http://lnkd.in/" && req.http.referer !~ "^http://t.co/" && req.http.referer !~ "^http://google.com/" && req.http.referer !~ "^http://bing.com/" && req.http.referer !~ "^http://yahoo.com/")) {
return (synth(403, "No hotlinking please"));
}
但是它不想执行,并且似乎取消了引用。任何帮助都将是惊人的。谢谢!