跳转到内容
搜索文档

静态资源保护 (Static resource protection)

最后更新 查看 MarkdownAgent 设置

专业版、商业版和企业版客户可以使用 Cloudflare 的 bot 解决方案来保护其 静态资源 免受 bot 的侵害。

Super Bot Fight Mode

要在作为专业版或商业版客户,或者没有购买 Bot Management 附加组件的企业版客户时启用此功能:

  1. 在 Cloudflare 仪表板中,前往 Security settings(安全设置) 页面。

    Go to Settings ↗
  2. Bot traffic(Bot 流量) 过滤。

  3. 前往 Super Bot Fight Mode

  4. Configurations(配置) 下,选择 Static resource protection(静态资源保护) 的编辑图标并开启它。

  1. 登录到 Cloudflare 仪表板,并选择您的账户和域。
  2. 前往 Security(安全) > Bots
  3. 选择 Configure Super Bot Fight Mode(配置 Super Bot Fight Mode)
  4. Static resource protection(静态资源保护) 处,选择 On(开启)

Enterprise Bot Management

当您使用 cf.bot_management.score 创建自定义规则时,默认情况下静态资源会受到保护。

要排除静态资源,您需要在自定义规则中包含 not (cf.bot_management.static_resource)

哪些文件受到保护?

静态资源是具有以下扩展名的文件:

ico|jpg|png|jpeg|gif|css|js|tif|tiff|bmp|pict|webp|svg|svgz|class|jar|txt|csv|doc|docx|xls|xlsx|pdf|ps|pls|ppt|pptx|ttf|otf|woff|woff2|eot|eps|ejs|swf|torrent|midi|mid|m3u8|m4a|mp3|ogg|ts

此外,无论文件扩展名如何,/.well-known/ URL 路径以及其中的所有元素都被视为静态资源。

这篇文档对您有帮助吗?