Nginx:过滤Pingback CC请求

写入 nginx.conf 过滤Pingback CC请求

if ($http_user_agent ~*
(ApacheBench|pingback|WordPress|MJ12bot|AhrefsBot|360JK|PHP|php|Jorgee)
) {return 101;} if ($http_user_agent = “” ) {return 101;} if (
$request = “POST /reg.html HTTP/1.1” ) {return 400;} if ( $request =
“POST / HTTP/1.1” ) {return 400;} if ( $request = “POST / HTTP/1.0” )
{return 400;} if ( $request = “POST // HTTP/1.0” ) {return 400;}

共有 2 条评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注