Skip to content

Commit 07a1a74

Browse files
[WAF] Update UI label for rule expression (#25977)
* Affects custom rules and rate limiting rules (Rules features are unchanged) --------- Co-authored-by: Pedro Sousa <[email protected]>
1 parent f4be667 commit 07a1a74

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/content/docs/logs/logpush/logpush-job/enable-destinations/splunk.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ If your logpush destination hostname is proxied through Cloudflare, and you have
181181

182182
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account. Go to **Security** > **WAF** > **Custom rules**.
183183
2. Select **Create rule** and enter a descriptive name for it (for example, `Splunk`).
184-
3. Under **If incoming requests match**, use the **Field**, **Operator**, and **Value** dropdowns to create a rule. After finishing each row, select **And** to create the next row of rules. Refer to the table below for the values you should input:
184+
3. Under **When incoming requests match**, use the **Field**, **Operator**, and **Value** dropdowns to create a rule. After finishing each row, select **And** to create the next row of rules. Refer to the table below for the values you should input:
185185

186186
| Field | Operator | Value |
187187
| ---------------- | ---------- | --------------------------------------------------------------------- |

src/content/docs/support/third-party-software/content-management-system-cms/improving-web-security-for-content-management-systems-like-wordpress.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Do the following:
9999
2. Import the certificate to your computers key storage. With macOS Keychain, you can use the steps listed in [Test in the browser](/cloudflare-one/identity/devices/access-integrations/mutual-tls-authentication/#test-in-the-browser).
100100
3. [Enable mTLS](/ssl/client-certificates/enable-mtls/) by adding the correct host.
101101
4. In **SSL/TLS** > **Client Certificates**, select **Create mTLS Rule**.
102-
5. Under **If incoming requests match**, enter a value for thr **URI Path** field to narrow the rule scope to the admin section, otherwise you will block your visitors from accessing the public content.
102+
5. Under **When incoming requests match**, enter a value for thr **URI Path** field to narrow the rule scope to the admin section, otherwise you will block your visitors from accessing the public content.
103103
6. Set the rule to *Block* any requests made to your admin panel if the client certificate is not verified.
104104
7. Select **Deploy**. This creates a WAF custom rule that checks all requests to the admin section for a valid client certificate.
105105

src/content/docs/waf/custom-rules/create-dashboard.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { Render, Tabs, TabItem, Steps, DashButton } from "~/components";
2626

2727
![Custom rule creation page in the Cloudflare dashboard](~/assets/images/waf/custom-rules/firewall-custom-rule-create.png)
2828

29-
5. Under **If incoming requests match**, use the **Field** drop-down list to choose an HTTP property. For each request, the value of the property you choose for **Field** is compared to the value you specify for **Value** using the operator selected in **Operator**.
29+
5. Under **When incoming requests match**, use the **Field** drop-down list to choose an HTTP property. For each request, the value of the property you choose for **Field** is compared to the value you specify for **Value** using the operator selected in **Operator**.
3030

3131
6. Under **Then take action**, select the rule action in the **Choose action** dropdown. For example, selecting _Block_ tells Cloudflare to refuse requests that match the conditions you specified.
3232

@@ -51,7 +51,7 @@ import { Render, Tabs, TabItem, Steps, DashButton } from "~/components";
5151

5252
![Custom rule creation page in the Cloudflare dashboard](~/assets/images/waf/custom-rules/firewall-custom-rule-create.png)
5353

54-
4. Under **If incoming requests match**, use the **Field** drop-down list to choose an HTTP property. For each request, the value of the property you choose for **Field** is compared to the value you specify for **Value** using the operator selected in **Operator**.
54+
4. Under **When incoming requests match**, use the **Field** drop-down list to choose an HTTP property. For each request, the value of the property you choose for **Field** is compared to the value you specify for **Value** using the operator selected in **Operator**.
5555

5656
5. Under **Then take action**, select the rule action in the **Choose action** dropdown. For example, selecting _Block_ tells Cloudflare to refuse requests that match the conditions you specified.
5757

src/content/docs/waf/detections/firewall-for-ai.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Alternatively, create a custom rule like the one described in the next step usin
8888

8989
[Create a custom rule](/waf/custom-rules/create-dashboard/) that blocks requests where Cloudflare detected personally identifiable information (PII) in the incoming request (as part of an LLM prompt), returning a custom JSON body:
9090

91-
- **If incoming requests match**:
91+
- **When incoming requests match**:
9292

9393
| Field | Operator | Value |
9494
| ---------------- | -------- | ----- |
@@ -155,7 +155,7 @@ When enabled, Firewall for AI populates the following fields:
155155

156156
The following example [custom rule](/waf/custom-rules/create-dashboard/) will block requests with an LLM prompt that tries to obtain PII of a specific [category](/ruleset-engine/rules-language/fields/reference/cf.llm.prompt.pii_categories/):
157157

158-
- **If incoming requests match**:
158+
- **When incoming requests match**:
159159

160160
| Field | Operator | Value |
161161
| ------------------ | -------- | ------------- |
@@ -170,7 +170,7 @@ The following example [custom rule](/waf/custom-rules/create-dashboard/) will bl
170170

171171
The following example [custom rule](/waf/custom-rules/create-dashboard/) will block requests with an LLM prompt containing unsafe content of specific [categories](/ruleset-engine/rules-language/fields/reference/cf.llm.prompt.unsafe_topic_categories/):
172172

173-
- **If incoming requests match**:
173+
- **When incoming requests match**:
174174

175175
| Field | Operator | Value |
176176
| --------------------------- | -------- | -------------------------------- |
@@ -185,7 +185,7 @@ The following example [custom rule](/waf/custom-rules/create-dashboard/) will bl
185185

186186
The following example [custom rule](/waf/custom-rules/create-dashboard/) will block requests with an [injection score](/ruleset-engine/rules-language/fields/reference/cf.llm.prompt.injection_score/) below `20`. Using a low injection score value in the rule helps avoid false positives.
187187

188-
- **If incoming requests match**:
188+
- **When incoming requests match**:
189189

190190
| Field | Operator | Value |
191191
| ------------------- | --------- | ----- |

src/content/docs/waf/get-started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ If you are an Enterprise customer, do the following:
9696
1. Reach out to your account team to get access to WAF attack score.
9797

9898
2. [Create a custom rule](/waf/custom-rules/create-dashboard/) using the <GlossaryTooltip term="attack score">Attack Score</GlossaryTooltip> field:
99-
- **If incoming requests match**:
99+
- **When incoming requests match**:
100100

101101
| Field | Operator | Value |
102102
| ---------------- | --------- | ----- |
@@ -118,7 +118,7 @@ Customers with access to [Bot Management](/bots/get-started/bot-management/) can
118118

119119
[Create a custom rule](/waf/custom-rules/create-dashboard/) using the <GlossaryTooltip term="bot score">Bot Score</GlossaryTooltip> and <GlossaryTooltip term="verified bot">Verified Bot</GlossaryTooltip> fields:
120120

121-
- **If incoming requests match**:
121+
- **When incoming requests match**:
122122

123123
| Field | Operator | Value | Logic |
124124
| ------------ | --------- | ----- | ----- |

src/content/docs/waf/rate-limiting-rules/parameters.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For more information on the current rule configuration restrictions, refer to [C
1313

1414
## Parameter reference
1515

16-
### If incoming requests match
16+
### When incoming requests match
1717

1818
- Data type: <Type text="String" />
1919
- Field name in the API: `expression` (rule field)
@@ -73,7 +73,7 @@ For important details about these characteristics, refer to [Notes about rate li
7373

7474
Only available in the Cloudflare dashboard when you enable **Use custom counting expression**.
7575

76-
Defines the criteria used for determining the request rate. By default, the counting expression is the same as the rule matching expression (defined in **If incoming requests match**). This default is also applied when you set this field to an empty string (`""`).
76+
Defines the criteria used for determining the request rate. By default, the counting expression is the same as the rule matching expression (defined in **When incoming requests match**). This default is also applied when you set this field to an empty string (`""`).
7777

7878
The counting expression can include [HTTP response fields](/ruleset-engine/rules-language/fields/reference/?field-category=Response). When there are response fields in the counting expression, the counting will happen after the response is sent.
7979

src/content/docs/waf/rate-limiting-rules/request-rate.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Consider the following configuration for a rate limiting rule:
4242

4343
**_Rate limiting rule #1_**
4444

45-
**If incoming requests match**:<br/>
45+
**When incoming requests match**:<br/>
4646
`http.request.uri.path eq "/form" and any(http.request.headers["content-type"][*] eq "application/x-www-form-urlencoded")`
4747

4848
**Choose action**: _Block_
@@ -53,7 +53,7 @@ Consider the following configuration for a rate limiting rule:
5353

5454
**Period**: _10 seconds_
5555

56-
**With the same value of** (characteristics):
56+
**With the same characteristics**:
5757

5858
- _Data center ID_ (included by default when creating the rule in the dashboard)
5959
- _IP_
@@ -81,7 +81,7 @@ Consider the following configuration for a rate limiting rule. The rule counting
8181

8282
**_Rate limiting rule #2_**
8383

84-
**If incoming requests match**:<br/>
84+
**When incoming requests match**:<br/>
8585
`http.request.uri.path eq "/form"`
8686

8787
**Choose action**: _Block_
@@ -92,7 +92,7 @@ Consider the following configuration for a rate limiting rule. The rule counting
9292

9393
**Period**: _10 seconds_
9494

95-
**With the same value of** (characteristics):
95+
**With the same characteristics**:
9696

9797
- _Data center ID_ (included by default when creating the rule in the dashboard)
9898
- _IP_
@@ -145,10 +145,10 @@ Consider the following configuration for a rate limiting rule. When there is a r
145145

146146
**_Rate limiting rule #3_**
147147

148-
**If incoming requests match**:<br />
148+
**When incoming requests match**:<br />
149149
`(http.request.uri.path eq "/graphql")`
150150

151-
**With the same value of** (characteristics):
151+
**With the same characteristics**:
152152

153153
- _Data center ID_ (included by default when creating the rule in the dashboard)
154154
- _Header value of_ > `x-api-key`

src/content/docs/waf/rate-limiting-rules/troubleshooting.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sidebar:
1010

1111
Cloudflare may count Workers subrequests on the same zone as separate requests, which will cause a rate limiting rule to trigger sooner than expected. This behavior happens when the rate limiting rule is configured with [**Also apply rate limiting to cached assets**](/waf/rate-limiting-rules/parameters/#also-apply-rate-limiting-to-cached-assets) set to false.
1212

13-
To prevent this behavior, you must exclude any Workers subrequests coming from the same zone from your rate limiting rule using the [`cf.worker.upstream_zone`](/ruleset-engine/rules-language/fields/reference/cf.worker.upstream_zone/) field. For example, you could add the following sub-expression to your [rate limiting rule expression](/waf/rate-limiting-rules/parameters/#if-incoming-requests-match):
13+
To prevent this behavior, you must exclude any Workers subrequests coming from the same zone from your rate limiting rule using the [`cf.worker.upstream_zone`](/ruleset-engine/rules-language/fields/reference/cf.worker.upstream_zone/) field. For example, you could add the following sub-expression to your [rate limiting rule expression](/waf/rate-limiting-rules/parameters/#when-incoming-requests-match):
1414

1515
```txt
1616
and (cf.worker.upstream_zone == "" or cf.worker.upstream_zone != "<YOUR_ZONE>")

0 commit comments

Comments
 (0)