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

Use lists in expressions

​​ Expression Builder

To use a list in the Expression Builder:

  1. Select is in list or is not in list from the Operator drop-down list.

    Selecting an IP list from the Value drop-down list when configuring the expression of a WAF custom rule

  2. Select a list from the Value drop-down list. Depending on your plan, you may be able to select a Managed IP List.

  3. To commit your changes and enable the rule, select Deploy. If you are not ready to enable the rule, select Save as Draft.

​​ Expression Editor

To use a list in the Expression Editor, specify the in operator and use $<list_name> to specify the name of the list.

Examples:

  • Expression matching requests from IP addresses that are in an IP list named office_network:

  • Expression matching requests with a source IP address different from IP addresses in the office_network IP list:

  • Expression matching requests from IP addresses in the Cloudflare Open Proxies Managed IP List: