Skip to content

Commit 6eaa36b

Browse files
committed
Add policy context partial
1 parent 7358b1d commit 6eaa36b

File tree

4 files changed

+36
-23
lines changed

4 files changed

+36
-23
lines changed

src/content/docs/cloudflare-one/policies/gateway/block-page.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Gateway can display a global block page in the browser of any user whose traffic
3030
To configure the global block page:
3131

3232
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Custom Pages**.
33-
2. Under **Account Gateway block page**, select **Customize**.
33+
2. Under **Account Gateway block page**, Gateway will display the current block page setting. Select **Customize**.
3434
3. Choose whether to use the default Gateway block page, a [URL redirect](#redirect-to-a-block-page), or a [custom Gateway block page](#customize-the-block-page).
3535
4. Select **Save**.
3636

@@ -43,10 +43,16 @@ To redirect users to a non-Cloudflare block page:
4343
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Custom Pages**.
4444
2. Under **Account Gateway block page**, select **Customize**.
4545
3. Choose **URL redirect**
46-
4. Select **Save**.
46+
4. Enter the URL you want to redirect blocked traffic to.
47+
5. (Optional) Turn on **Send policy context** to send [additional policy context](#policy-context) to the redirected URL.
48+
6. Select **Save**.
4749

4850
Gateway will now redirect users to a custom page when user traffic matches a Block policy with the block page configured.
4951

52+
#### Policy context
53+
54+
<Render file="gateway/policy-context" />
55+
5056
### Customize the block page
5157

5258
<Render file="gateway/customize-block-page" />

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

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,26 +95,7 @@ The Redirect action allows you to redirect matched HTTP requests to a different
9595

9696
In **Policy URL redirect**, you can define what URL to redirect matched requests to.
9797

98-
When you turn on **Send policy context**, Gateway will append details of the matching HTTP request to the redirected URL as a query string. Not every context field will be included. Potential policy context fields include:
99-
100-
<Details header="Policy context fields">
101-
102-
| Field | Definition | Example |
103-
| --------------------- | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
104-
| User email | Email of the user that made the query. | `&[email protected]` |
105-
| Site URL | URL of the original HTTP request. | `&site_uri=https%3A%2F%2Fmalware.testcategory.com%2F` |
106-
| URL category | [Domain categories](/cloudflare-one/policies/gateway/domain-categories/) of the URL to be redirected. | `&request_categories=New%20Domains,Newly%20Seen%20Domains` |
107-
| Original HTTP referer | Original HTTP referer header of the HTTP request. | `&referer=https%3A%2F%2Fexample.com%2F` |
108-
| Rule ID | ID of the Gateway policy that matched the request. | `&rule_id=6d48997c-a1ec-4b16-b42e-d43ab4d071d1` |
109-
| Source IP | Source IP address of the device that matched the policy. | `&source_ip=203.0.113.5` |
110-
| Device ID | UUID of the device that matched the policy. | `&device_id=6d48997c-a1ec-4b16-b42e-d43ab4d071d1` |
111-
| Application names | Name of the application the redirected domain corresponds to, if any. | `&application_name=Salesforce` |
112-
| Account ID | [Cloudflare account ID](/fundamentals/setup/find-account-and-zone-ids/) of the associated Zero Trust account. | `&account_id=d57c3de47a013c03ca7e237dd3e61d7d` |
113-
| Connection ID | ID of the proxy connection for which the redirect took effect. | `&connection_id=f8dc6fd3-a7a5-44dd-8b77-08430bb4fac3` |
114-
| Request ID | ID of the HTTP request for which the redirect took effect. | `&request_id=f8dc6fd3-a7a5-44dd-8b77-08430bb4fac3` |
115-
| Query ID | ID of the DNS query for which the redirect took effect. | `&query_id=f8dc6fd3-a7a5-44dd-8b77-08430bb4fac3` |
116-
117-
</Details>
98+
<Render file="gateway/policy-context" />
11899

119100
When you turn on **Preserve original URL and query string**, Gateway will append the original path and query string to the redirected URL. For example, if the original URL is `example.com/path/to/page?query&string` and the redirect URL is `internalapp.com`, Gateway will redirect requests to `internalapp.com/path/to/page?query&string`.
120101

src/content/partials/cloudflare-one/gateway/customize-block-page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To customize your block page:
88

99
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Custom Pages**.
1010
2. Under **Account Gateway block page**, select **Customize**.
11-
3. Choose **Custom Gateway block page**. Gateway will display a preview of your custom block page. Available global customizations include:
11+
3. Choose **Custom Gateway block page**. Gateway will display a preview of your custom block page. Available customizations include:
1212
- Your organization's name
1313
- [Logo](/cloudflare-one/policies/gateway/block-page/#add-a-logo-image)
1414
- Header text
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
{}
3+
---
4+
5+
import { Details } from "~/components";
6+
7+
When you turn on **Send policy context**, Gateway will append details of the matching request to the redirected URL as a query string. Not every context field will be included. Potential policy context fields include:
8+
9+
<Details header="Policy context fields">
10+
11+
| Field | Definition | Example |
12+
| --------------------- | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
13+
| User email | Email of the user that made the query. | `&[email protected]` |
14+
| Site URL | URL of the original HTTP request. | `&site_uri=https%3A%2F%2Fmalware.testcategory.com%2F` |
15+
| URL category | [Domain categories](/cloudflare-one/policies/gateway/domain-categories/) of the URL to be redirected. | `&request_categories=New%20Domains,Newly%20Seen%20Domains` |
16+
| Original HTTP referer | Original HTTP referer header of the HTTP request. | `&referer=https%3A%2F%2Fexample.com%2F` |
17+
| Rule ID | ID of the Gateway policy that matched the request. | `&rule_id=6d48997c-a1ec-4b16-b42e-d43ab4d071d1` |
18+
| Source IP | Source IP address of the device that matched the policy. | `&source_ip=203.0.113.5` |
19+
| Device ID | UUID of the device that matched the policy. | `&device_id=6d48997c-a1ec-4b16-b42e-d43ab4d071d1` |
20+
| Application names | Name of the application the redirected domain corresponds to, if any. | `&application_name=Salesforce` |
21+
| Account ID | [Cloudflare account ID](/fundamentals/setup/find-account-and-zone-ids/) of the associated Zero Trust account. | `&account_id=d57c3de47a013c03ca7e237dd3e61d7d` |
22+
| Connection ID | ID of the proxy connection for which the redirect took effect. | `&connection_id=f8dc6fd3-a7a5-44dd-8b77-08430bb4fac3` |
23+
| Request ID | ID of the HTTP request for which the redirect took effect. | `&request_id=f8dc6fd3-a7a5-44dd-8b77-08430bb4fac3` |
24+
| Query ID | ID of the DNS query for which the redirect took effect. | `&query_id=f8dc6fd3-a7a5-44dd-8b77-08430bb4fac3` |
25+
26+
</Details>

0 commit comments

Comments
 (0)