Cloudflare 中文文档
Ruleset Engine
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

Deploy a custom ruleset

Before you begin:

  1. Obtain the name of the phase where you want to deploy the custom ruleset.
  2. Create a custom ruleset and keep the ID of the new custom ruleset.
  3. Fetch the rules already present in the phase entry point ruleset. You must include in the PUT request all existing rules you want to keep.

To deploy a custom ruleset, add a rule that executes the custom ruleset. Define the rule scope in the rule expression.

​​ Example

The following PUT request adds a rule that executes a custom ruleset when the zone name matches example.com.

The response displays the rules in your phase.