一下子清静多了,MAC设备访问全给禁了

查看 36|回复 1
作者:DRS   
nginx配置文件里加上这些
[ol]
  • if ($http_user_agent ~* (Macintosh.*bot|Macintosh.*spider|Macintosh.*crawl|Macintosh.*scraper|Macintosh.*curl|Macintosh.*wget|Macintosh.*python|Macintosh.*httpclient|Macintosh.*java|Macintosh.*Go-http)){
  •         # [20260606] 屏蔽Mac爬虫类UA,保留正常Mac浏览器
  • return 403;
  • }
  •     # [20260606] 屏蔽伪装老Mac UA(PPC已停产,Safari 125不存在)
  •     if ($http_user_agent ~* "Macintosh.*U;.*PPC"){
  • return 403;
  •     }[/ol]复制代码

    屏蔽, 设备

  • 小李0005   
    谢谢分享
    您需要登录后才可以回帖 登录 | 立即注册

    返回顶部