#禁止指定user_agent(浏览器标识)
if ($http_user_agent ~ 'curl|baidu')
{
return 403;
}


if ($http_user_agent ~* 'curl|baidu')

~*作用:不区分大小写