- #SECURITY-START 防盗链配置
- location ~ .*\.(htm|html|js|css|json|txt|md|csv|xml|log|conf|vue|jpg|jpeg|gif|png|tif|tiff|bmp|svg|psd|ico|tga|imb|mp3|mp4|avi|mpeg|rm|ra|ogg|wav|wmv|rmi|aac|rmvb|mkv|flv|swf|mov|movie|exe|ios|apk|ipa|pxl|sis|cab|deb|rar|zip|gzip|tar|7z|bzip2|dmg|gz|wim|tbz|tpz|z|jar|ttf|otf|woff|woff2|eot|sfnt)?$
- {
- expires max;
- access_log off;
- valid_referers none blocked *.你的域名.com *.bt.cn *.baidu.com *.google.com *.bing.com *.sogou.com *.so.com *.chinaso.com *.baiducontent.com *.bingj.com *.360webcache.com *.sogoucdn.com *.googleusercontent.com 127.0.0.1;
- if ($invalid_referer){
- return 403;
- }
- }
- #SECURITY-END
复制代码 以上可以针对带宽较小的图片较多的博客网站节省带宽开销
|
|