[ Web Proxy ]
URL:
Viewing: https://developers.cloudflare.com/waf/tools/lists/use-in-expressions/ [Back]  [Original]

Use lists in expressions Cloudflare Web Application Firewall (WAF) docsSkip to content
SearchCtrlKLog in
  1. Home
  2. /WAF
  3. /
    Additional tools
  4. /Lists
  5. /Use lists in expressions

Use lists in expressions

Last updated Apr 16, 2026Copy as MarkdownView as MarkdownAgent setup
OverviewUse a list in the Expression BuilderUse a list in the Expression Editor

In the Cloudflare dashboard, there are two options for editing expressions:

  • Expression Builder: Allows you to create expressions using drop-down lists, emphasizing a visual approach to defining an expression.
  • Expression Editor: A text-only interface that supports advanced features, such as grouping symbols and functions for transforming and validating values.

Use a list in the Expression Builder

To use a list in the Expression Builder:

  1. From the Operator drop-down list, select is in list or is not in list. Note that not all fields support these operators.

    Selecting an IP list from the Value drop-down list when configuring the expression of a WAF custom rule [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.

Use a list in the 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:

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

    not ip.src in $office_network
  • Expression matching requests from IP addresses in the Cloudflare Open Proxies Managed IP List:

    ip.src in $cf.open_proxies
PreviousCreate in the dashboardNextOverview

Was this helpful?

YesNo
Edit pageReport issue
[]

Web Proxy Viewer  |  New URL  |  Original Page