nginx防盗链
location ~ .*\.(jpg|gif|png)$ {
gzip on;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
valid_referers(允许那些信息访问) none(允许没有带refer) blocked(允许不是标准的refer) 116.62.103.228(允许这个ip访问) jeson.imoocc.com ~wei\.png;
if ($invalid_referer) {
return 403(不满足返回403);
}
root /opt/app/code/images;
}