nginx 防盗链配置 server{ # 省略其他配置 #对源站点验证,非xxx.com域名下访问则拒绝 valid_referers *.xxx.com; #非法引入会进入下方判断 if ($invalid_referer) { return 404; } }