
valid_referers none blocked *.ttlsa.com server_names ~\.image\. ~\.baidu\.;
if ($invalid_referer) {
return ; 例如:
server {
listen ;
server_name test.image.xxxxxxx.com;
location / {
proxy_pass http://test.image_pools;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwoarded-For $proxy_add_x_forwarded_for;
}
valid_referers none blocked *.ttlsa.com server_names ~\.image\. ~\.baidu\.;
if ($invalid_referer) {
return ;
}
}
配置 到*.ttlsa.com的referer通过,如果有*.image.*,*.baidu.*的通过