nginx封空user_agent实现封禁迅雷的方法

 更新时间:2016年1月27日 20:15  点击:1655
以下代码写入 server {....} 内
复制代码 代码如下:

if ($http_user_agent ~ ^$) {
return 503;
}
if ($http_user_agent ~* "Mozilla/4.0\ \(compatible;\ MSIE\ 6.0;\ Windows\ NT\ 5.1;\ SV1;\ .NET\ CLR\ 1.1.4322;\ .NET\ CLR\ 2.0.50727\)") {
return 503;
}
[!--infotagslink--]

相关文章