Skip to content

Commit a97e63b

Browse files
authored
[DLP] Body Phase selector (#25543)
1 parent 0010e46 commit a97e63b

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/content/changelog/dlp/2025-09-25-body-phase-selector.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ date: 2025-09-25
88

99
You can now more precisely control your HTTP DLP policies by specifying whether to scan the request or response body, helping to reduce false positives and target specific data flows.
1010

11-
In the Gateway HTTP policy builder, you will find a new optional selector called _Body Phase_. This allows you to define the direction of traffic the DLP engine will inspect:
11+
In the Gateway HTTP policy builder, you will find a new selector called _Body Phase_. This allows you to define the direction of traffic the DLP engine will inspect:
1212

1313
- _Request Body_: Scans data sent from a user's machine to an upstream service. This is ideal for monitoring data uploads, form submissions, or other user-initiated data exfiltration attempts.
1414
- _Response Body_: Scans data sent to a user's machine from an upstream service. Use this to inspect file downloads and website content for sensitive data.
@@ -17,4 +17,4 @@ For example, consider a policy that blocks Social Security Numbers (SSNs). Previ
1717

1818
All policies without this selector will continue to scan both request and response bodies to ensure continued protection.
1919

20-
For more information, refer to [Gateway HTTP policy selectors](/cloudflare-one/policies/gateway/http-policies/#selectors/).
20+
For more information, refer to [Gateway HTTP policy selectors](/cloudflare-one/policies/gateway/http-policies/#body-phase/).

src/content/docs/cloudflare-one/policies/gateway/http-policies/index.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,18 @@ You can match traffic based on **Application Controls**, which group multiple us
432432

433433
For more information, refer to [Application Granular Controls](/cloudflare-one/policies/gateway/http-policies/granular-controls/).
434434

435+
### Body Phase
436+
437+
The phase of an HTTP request. You can use this selector to specify whether to scan either the data sent in an HTTP request to your user's device or from your user's device to a destination. Policies without this selector will scan both the HTTP request and response bodies.
438+
439+
| UI name | API example |
440+
| ---------- | --------------------------------- |
441+
| Body Phase | `http.body_phase == \"download\"` |
442+
443+
:::caution[Body phase mismatch]
444+
When combining this selector with the [Download and Upload File Types selectors](#download-and-upload-file-types), ensure you use the matching phase togethers. If body phase and file type selector logic do not match, the policy may not filter traffic as intended.
445+
:::
446+
435447
### Content Categories
436448

437449
<Render

0 commit comments

Comments
 (0)