server {
...
valid_referers none blocked 119.28.190.215;
只允许指定ip 或 域名 访问
if ($invalid_referer) {
return 403;
}
valid_referers none blocked 119.28.190.215;
不允许指定ip 或域名访问
if ($invalid_referer != 1) {
return 403;
}
...
}
实际使用中有坑.. 功效不确定