diff --git a/src/assets/images/rules/transform/create-request-header-modification-rule.png b/src/assets/images/rules/transform/create-request-header-modification-rule.png deleted file mode 100644 index 7825e86791cbbd..00000000000000 Binary files a/src/assets/images/rules/transform/create-request-header-modification-rule.png and /dev/null differ diff --git a/src/assets/images/rules/transform/create-response-header-modification-rule.png b/src/assets/images/rules/transform/create-response-header-modification-rule.png deleted file mode 100644 index 6c89b0b2737b34..00000000000000 Binary files a/src/assets/images/rules/transform/create-response-header-modification-rule.png and /dev/null differ diff --git a/src/assets/images/rules/transform/transform-rules-tab.png b/src/assets/images/rules/transform/transform-rules-tab.png deleted file mode 100644 index 18580fd3afea8b..00000000000000 Binary files a/src/assets/images/rules/transform/transform-rules-tab.png and /dev/null differ diff --git a/src/content/changelogs/rules.yaml b/src/content/changelogs/rules.yaml index a6178be83a9509..8f4cd9686b7b24 100644 --- a/src/content/changelogs/rules.yaml +++ b/src/content/changelogs/rules.yaml @@ -5,6 +5,18 @@ productLink: "/rules/" productArea: Application performance productAreaLink: /fundamentals/reference/changelog/performance/ entries: + - publish_date: "2025-01-09" + title: New Rules Overview page + description: |- + The new **Rules Overview** interface consolidates Cloudflare Rules products into a single, intuitive page, simplifying navigation and rule management. Key features include: + + - **Unified interface**: Manage all rules in one place — no more navigating through multiple menu tabs. + - **Search across rules**: Quickly locate specific rules. + - **Clear rule order**: View and manage rules by their execution sequence for streamlined configuration. + - **Enhanced visibility**: Instantly view the filter (conditions) and action (outcome) for every rule. + - **Faster debugging**: Use Trace directly from the zone-level interface for simple, quick troubleshooting. + + The new page is available in the Cloudflare dashboard at **Rules** > **Overview**. - publish_date: "2024-12-11" title: Snippets support in the Cloudflare provider for Terraform description: |- diff --git a/src/content/docs/api-shield/security/jwt-validation/transform-rules.mdx b/src/content/docs/api-shield/security/jwt-validation/transform-rules.mdx index 0046cab4bed450..a4d91d49ad2a64 100644 --- a/src/content/docs/api-shield/security/jwt-validation/transform-rules.mdx +++ b/src/content/docs/api-shield/security/jwt-validation/transform-rules.mdx @@ -7,7 +7,6 @@ sidebar: head: - tag: title content: Enhance Transform Rules with JWT claims - --- You can forward information from a [JSON Web Token (JWT)](/api-shield/security/jwt-validation/) to the origin in a header by creating [Transform Rules](/rules/transform/) using claims that Cloudflare has verified via the JSON Web Token. @@ -16,21 +15,19 @@ Claims are available through the `http.request.jwt.claims` firewall fields. For example, the following expression will extract the user claim from a token processed by the Token Configuration with `TOKEN_CONFIGURATION_ID`: -```json - +```txt lookup_json_string(http.request.jwt.claims[""][0], "claim_name") - ``` -​​Refer to [Configure JWT Validation](/api-shield/security/jwt-validation/configure/) for more information about creating a Token Configuration. +Refer to [Configure JWT Validation](/api-shield/security/jwt-validation/configure/) for more information about creating a Token Configuration. ## Create a Transform Rule As an example, to send the `x-send-jwt-claim-user` request header to the origin, you must create a Transform Rule: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Go to **Rules** > **Transform Rules**. -3. Select **Modify Request Header** > **Create rule**. +2. Go to **Rules** > **Overview**. +3. Next to **Request Header Transform Rules**, select **Create rule**. 4. Enter a rule name and a filter expression, if applicable. 5. Choose **Set dynamic**. 6. Set the header name to `x-send-jwt-claim-user`. diff --git a/src/content/docs/cache/how-to/cache-rules/create-dashboard.mdx b/src/content/docs/cache/how-to/cache-rules/create-dashboard.mdx index 6f4210f1abac0f..b04d8f97744af6 100644 --- a/src/content/docs/cache/how-to/cache-rules/create-dashboard.mdx +++ b/src/content/docs/cache/how-to/cache-rules/create-dashboard.mdx @@ -9,8 +9,8 @@ head: --- 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Go to **Caching** > **Cache Rules**. -3. To create a new empty rule, select **Create rule**. To duplicate an existing rule, select the three dots next to it > **Duplicate**. +2. Go to **Rules** > **Overview**. +3. Next to **Cache Rules**, select **Create rule**. 4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. 5. Enter a descriptive name for the rule in **Rule name**. 6. Under **When incoming requests match**, select **All incoming requests** if you want the rule to apply to all traffic or **Custom filter expression** if you want the rule to only apply to traffic matching the custom expression. diff --git a/src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/saas-customers/provider-guides/salesforce-commerce-cloud.mdx b/src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/saas-customers/provider-guides/salesforce-commerce-cloud.mdx index c8c44a2fbc43ad..8db4f8b6a4b143 100644 --- a/src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/saas-customers/provider-guides/salesforce-commerce-cloud.mdx +++ b/src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/saas-customers/provider-guides/salesforce-commerce-cloud.mdx @@ -5,16 +5,21 @@ head: - tag: title content: Salesforce Commerce Cloud | Provider guides description: Learn how to configure your Enterprise zone with Salesforce Commerce Cloud. - --- -import { Details, Render } from "~/components" +import { Details, Render } from "~/components"; - + ## Benefits - + ## How it works @@ -24,7 +29,7 @@ For additional detail about how traffic routes when O2O is enabled, refer to [Ho To enable O2O requires the following: -1. Your SFCC environment must be configured as an "SFCC Proxy Zone". If you currently have an "SFCC Legacy Zone", you cannot enable O2O. More details on the different types of SFCC configurations can be found [here](https://help.salesforce.com/s/articleView?id=cc.b2c_ecdn_proxy_zone_faq.htm\&type=5). +1. Your SFCC environment must be configured as an "SFCC Proxy Zone". If you currently have an "SFCC Legacy Zone", you cannot enable O2O. More details on the different types of SFCC configurations can be found in the [Salesforce FAQ on SFCC Proxy Zones](https://help.salesforce.com/s/articleView?id=cc.b2c_ecdn_proxy_zone_faq.htm&type=5). 2. Your own Cloudflare zone on an Enterprise plan. If you meet the above requirements, O2O can then be enabled per hostname. To enable O2O for a specific hostname within your Cloudflare zone, [create](/dns/manage-dns-records/how-to/create-dns-records/#create-dns-records) a Proxied `CNAME` DNS record with a target of the `CNAME` provided by SFCC Business Manager, which is the dashboard used by SFCC customers to configure their storefront environment. @@ -41,7 +46,6 @@ The `CNAME` provided by SFCC Business Manager will resemble `commcloud.prod-abcd For O2O to be configured properly, make sure your Proxied DNS record targets your SFCC CNAME **directly**. Do not indirectly target the SFCC CNAME by targeting another Proxied DNS record in your Cloudflare zone which targets the SFCC CNAME. -
For example, if the hostnames routing traffic to SFCC are `www.example.com` and `preview.example.com`, the following is a **correct** configuration in your Cloudflare zone: @@ -51,10 +55,8 @@ For example, if the hostnames routing traffic to SFCC are `www.example.com` and | `CNAME` | `www.example.com` | `commcloud.prod-abcd-example-com.cc-ecdn.net` | Proxied | | `CNAME` | `preview.example.com` | `commcloud.prod-abcd-example-com.cc-ecdn.net` | Proxied | -
-
And, the following is an **incorrect** configuration because `preview.example.com` indirectly targets the SFCC CNAME via the `www.example.com` Proxied DNS record, which means O2O will not be properly enabled for hostname `preview.example.com`: @@ -64,7 +66,6 @@ And, the following is an **incorrect** configuration because `preview.example.co | `CNAME` | `www.example.com` | `commcloud.prod-abcd-example-com.cc-ecdn.net` | Proxied | | `CNAME` | `preview.example.com` | `www.example.com` | Proxied | -
## Product compatibility @@ -73,7 +74,10 @@ And, the following is an **incorrect** configuration because `preview.example.co ## Additional support - + ### Resolving SSL errors using Cloudflare Managed Certificates @@ -84,25 +88,25 @@ If you do have a `CAA` record, verify that it permits SSL certificates to be iss ### Best practice Zone-level configuration 1. Set **Minimum TLS version** to **TLS 1.2** - 1. Navigate to **SSL/TLS > Edge Certificates**, scroll down the page to find **Minimum TLS Version**, and set it to *TLS 1.2*. This setting applies to every Proxied DNS record in your Zone. + 1. Navigate to **SSL/TLS > Edge Certificates**, scroll down the page to find **Minimum TLS Version**, and set it to _TLS 1.2_. This setting applies to every Proxied DNS record in your Zone. 2. Match the **Security Level** set in **SFCC Business Manager** - 1. *Option 1: Zone-level* - Navigate to **Security > Settings**, find **Security Level** and set **Security Level** to match what is configured in **SFCC Business Manager**. This setting applies to every Proxied DNS record in your Cloudflare zone. - 2. *Option 2: Per Proxied DNS record* - If the **Security Level** differs between the Proxied DNS records targeting your SFCC environment and other Proxied DNS records in your Cloudflare zone, use a **Configuration Rule** to set the **Security Level** specifically for the Proxied DNS records targeting your SFCC environment. For example: - 1. Create a new **Configuration Rule** by navigating to **Rules > Configuration Rules** and click **Create rule**: + 1. _Option 1: Zone-level_ - Navigate to **Security > Settings**, find **Security Level** and set **Security Level** to match what is configured in **SFCC Business Manager**. This setting applies to every Proxied DNS record in your Cloudflare zone. + 2. _Option 2: Per Proxied DNS record_ - If the **Security Level** differs between the Proxied DNS records targeting your SFCC environment and other Proxied DNS records in your Cloudflare zone, use a **Configuration Rule** to set the **Security Level** specifically for the Proxied DNS records targeting your SFCC environment. For example: + 1. Create a new **Configuration Rule** by navigating to **Rules** > **Overview** and selecting **Create rule** next to **Configuration Rules**: 1. **Rule name:** `Match Security Level on SFCC hostnames` - 2. **Field:** *Hostname* - 3. **Operator:** *is in* (this will match against multiple hostnames specified in the **Value** field) + 2. **Field:** _Hostname_ + 3. **Operator:** _is in_ (this will match against multiple hostnames specified in the **Value** field) 4. **Value:** `www.example.com` `dev.example.com` 5. Scroll down to **Security Level** and click **+ Add** - 1. **Select Security Level:** *Medium* (this should match the **Security Level** set in **SFCC Business Manager**) + 1. **Select Security Level:** _Medium_ (this should match the **Security Level** set in **SFCC Business Manager**) 6. Scroll to the bottom of the page and click **Deploy** 3. Disable **Browser Integrity Check** - 1. *Option 1: Zone-level* - Navigate to **Security > Settings**, find **Browser Integrity Check** and toggle it off to disable it. This setting applies to every Proxied DNS record in your Cloudflare zone. - 2. *Option 2: Per Proxied DNS record* - If you want to keep **Browser Integrity Check** enabled for other Proxied DNS records in your Cloudflare zone but want to disable it on Proxied DNS records targeting your SFCC environment, keep the Zone-level **Browser Integrity Check** feature enabled and use a **Configuration Rule** to disable **Browser Integrity Check** specifically for the hostnames targeting your SFCC environment. For example: - 1. Create a new **Configuration Rule** by navigating to **Rules > Configuration Rules** and click **Create rule**: + 1. _Option 1: Zone-level_ - Navigate to **Security > Settings**, find **Browser Integrity Check** and toggle it off to disable it. This setting applies to every Proxied DNS record in your Cloudflare zone. + 2. _Option 2: Per Proxied DNS record_ - If you want to keep **Browser Integrity Check** enabled for other Proxied DNS records in your Cloudflare zone but want to disable it on Proxied DNS records targeting your SFCC environment, keep the Zone-level **Browser Integrity Check** feature enabled and use a **Configuration Rule** to disable **Browser Integrity Check** specifically for the hostnames targeting your SFCC environment. For example: + 1. Create a new **Configuration Rule** by navigating to **Rules** > **Overview** and selecting **Create rule** next to **Configuration Rules**: 1. **Rule name:** `Disable Browser Integrity Check on SFCC hostnames` - 2. **Field:** *Hostname* - 3. **Operator:** *is in* (this will match against multiple hostnames specified in the **Value** field) + 2. **Field:** _Hostname_ + 3. **Operator:** _is in_ (this will match against multiple hostnames specified in the **Value** field) 4. **Value:** `www.example.com` `dev.example.com` 5. Scroll down to **Browser Integrity Check** and click the **+ Add** button: 1. Set the toggle to **Off** (a grey X will be displayed) @@ -111,13 +115,13 @@ If you do have a `CAA` record, verify that it permits SSL certificates to be iss 1. Your SFCC environment, also called a **Realm**, will contain one to many SFCC Proxy Zones, which is where caching will always occur. In the corresponding SFCC Proxy Zone for your domain, SFCC performs their own cache optimization, so it is recommended to bypass the cache on the Proxied DNS records in your Cloudflare zone which target your SFCC environment to prevent a "double caching" scenario. This can be accomplished with a **Cache Rule**. 2. If the **Cache Rule** is not created, caching will occur in both your Cloudflare zone and your corresponding SFCC Proxy Zone, which can cause issues if and when the cache is invalidated or purged in your SFCC environment. 1. Additional information on caching in your SFCC environment can be found in [SFCC's Content Cache Documentation](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-content-cache.html) - 3. Create a new **Cache Rule** by navigating to **Rules > Cache Rules** and click **Create rule**: + 3. Create a new **Cache Rule** by navigating to **Rules** > **Overview** and selecting **Create rule** next to **Cache Rules**: 1. **Rule name:** `Bypass cache on SFCC hostnames` - 2. **Field:** *Hostname* - 3. **Operator:** *is in* (this will match against multiple hostnames specified in the **Value** field) + 2. **Field:** _Hostname_ + 3. **Operator:** _is in_ (this will match against multiple hostnames specified in the **Value** field) 4. **Value:** `www.example.com` `dev.example.com` - 5. **Cache eligibility:** Select **Bypass cache** - 6. Scroll to the bottom of the page and click **Deploy** -5. *Optional* - Upload your Custom Certificate from **SFCC Business Manager** to your Cloudflare zone + 5. **Cache eligibility:** Select **Bypass cache**. + 6. Scroll to the bottom of the page and select **Deploy**. +5. _Optional_ - Upload your Custom Certificate from **SFCC Business Manager** to your Cloudflare zone: 1. The Custom Certificate you uploaded via **SFCC Business Manager** or **SFCC CDN-API**, which exists within your corresponding SFCC Proxy Zone, will terminate TLS connections for your SFCC storefront hostnames. Because of that, it is optional if you want to upload the same Custom Certificate to your own Cloudflare zone. Doing so will allow Cloudflare users with specific roles in your Cloudflare account to receive expiration notifications for your Custom Certificates. Please read [renew custom certificates](/ssl/edge-certificates/custom-certificates/renewing/#renew-custom-certificates) for further details. 2. Additionally, since you now have your own Cloudflare zone, you have access to Cloudflare's various edge certificate products which means you could have more than one certificate covering the same SANs. In that scenario, a certificate priority process occurs to determine which certificate to serve at the Cloudflare edge. If you find your SFCC storefront hostnames are presenting a different certificate compared to what you uploaded via **SFCC Business Manager** or **SFCC CDN-API**, the certificate priority process is likely the reason. Please read [certificate priority](/ssl/reference/certificate-and-hostname-priority/#certificate-deployment) for further details. diff --git a/src/content/docs/firewall/troubleshooting/required-changes-to-enable-url-normalization.mdx b/src/content/docs/firewall/troubleshooting/required-changes-to-enable-url-normalization.mdx index 2936c3e2d16f8b..193158dbc9e656 100644 --- a/src/content/docs/firewall/troubleshooting/required-changes-to-enable-url-normalization.mdx +++ b/src/content/docs/firewall/troubleshooting/required-changes-to-enable-url-normalization.mdx @@ -24,7 +24,7 @@ Cloudflare did not enable URL normalization automatically for zones that would b ## Why URL normalization is important -Cloudflare strongly recommends that you enable **Normalize incoming URLs** in **Rules** > **URL Normalization** to strengthen your zone's security posture. Not doing so leaves your zone at greater risk of a successful attack. Malicious parties could craft the URL in a way that the rules are not accounting for. +Cloudflare strongly recommends that you enable **Normalize incoming URLs** in **Rules** > **Overview** > **URL Normalization** to strengthen your zone's security posture. Not doing so leaves your zone at greater risk of a successful attack. Malicious parties could craft the URL in a way that the rules are not accounting for. For example, a firewall rule with an expression such as `http.request.uri.path contains "/login"` could be bypassed if the malicious actor has encoded the `l` character as `%6C`. In this scenario, and with URL normalization disabled, traffic would not be matched by the firewall rule. @@ -55,7 +55,7 @@ Before enabling URL normalization, you should review the affected firewall rules ### 2. Enable URL normalization -Once you have updated the affected firewall rules, enable URL normalization in **Rules** > **URL Normalization**. +Once you have updated the affected firewall rules, enable URL normalization in **Rules** > **Overview** > **URL Normalization**. A Cloudflare user must have the [Firewall role](/fundamentals/setup/manage-members/roles/) or one of the Administrator roles to access URL normalization settings in the dashboard. diff --git a/src/content/docs/images/manage-images/serve-images/serve-from-custom-domains.mdx b/src/content/docs/images/manage-images/serve-images/serve-from-custom-domains.mdx index 43c18f3b7d9dbc..2bf997bc63640f 100644 --- a/src/content/docs/images/manage-images/serve-images/serve-from-custom-domains.mdx +++ b/src/content/docs/images/manage-images/serve-images/serve-from-custom-domains.mdx @@ -3,7 +3,6 @@ pcx_content_type: how-to title: Serve images from custom domains sidebar: order: 22 - --- Image delivery is supported from all customer domains under the same Cloudflare account. To serve images through custom domains, an image URL should be adjusted to the following format: @@ -20,11 +19,11 @@ https://example.com/cdn-cgi/imagedelivery/ZWd9g1K7eljCn_KDTu_MWA/083eb7b2-5392-4 In this example, ``, `` and `` are the same, but the hostname and prefix path is different: -* `example.com`: Cloudflare proxied domain under the same account as the Cloudflare Images. -* `/cdn-cgi/imagedelivery`: Path to trigger `cdn-cgi` image proxy. -* `ZWd9g1K7eljCn_KDTu_MWA`: The Images account hash. This can be found in the Cloudflare Images Dashboard. -* `083eb7b2-5392-4565-b69e-aff66acddd00`: The image ID. -* `public`: The variant name. +- `example.com`: Cloudflare proxied domain under the same account as the Cloudflare Images. +- `/cdn-cgi/imagedelivery`: Path to trigger `cdn-cgi` image proxy. +- `ZWd9g1K7eljCn_KDTu_MWA`: The Images account hash. This can be found in the Cloudflare Images Dashboard. +- `083eb7b2-5392-4565-b69e-aff66acddd00`: The image ID. +- `public`: The variant name. ## Custom paths @@ -32,34 +31,32 @@ By default, Images are served from the `/cdn-cgi/imagedelivery/` path. You can u ### Basic version -Free and Pro plans only support string matching rules that do not require regular expressions. +Free and Pro plans support string matching rules (including wildcard operations) that do not require regular expressions. -This example lets you rewrite a request from example.com/images to `example.com/cdn-cgi/imagedelivery/`. +This example lets you rewrite a request from `example.com/images` to `example.com/cdn-cgi/imagedelivery/`. To create a rule: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and website. -2. Select **Rules** > **Transform Rules**. -3. Select **Create rule**. -4. Under **When incoming requests match...**, select **Edit expression**. -5. In the text field, enter `starts_with(http.request.uri.path, "/images")`. -6. Under **Path**, select **Rewrite to**. -7. Select *Dynamic* and enter the following in the text field. +2. Go to **Rules** > **Overview**. +3. Next to **URL Rewrite Rules**, select **Create rule**. +4. Under **If incoming requests match**, select **Wildcard pattern** and enter the following **Request URL** (update with your own domain): -```txt -concat( - "/cdn-cgi/imagedelivery/", - substring(http.request.uri.path, 7) -) -``` + ```txt + https://example.com/images/* + ``` -8. Select **Deploy** when you are done. +5. Under **Then rewrite the path and/or query** > **Path**, enter the following values (using your account hash): -### ​​Advanced version + - **Target path**: [`/`] `images/*` + - **Rewrite to**: [`/`] `cdn-cgi/imagedelivery//${1}` -:::note +6. Select **Deploy** when you are done. -This feature requires a Business or Enterprise plan to enable regex in Transform Rules. Refer to Cloudflare [Transform Rules Availability](/rules/transform/#availability) for more information. +### Advanced version + +:::note +This feature requires a Business or Enterprise plan to enable regular expressions in Transform Rules. Refer to Cloudflare [Transform Rules Availability](/rules/transform/#availability) for more information. ::: This example lets you rewrite a request from `example.com/images/some-image-id/w100,h300` to `example.com/cdn-cgi/imagedelivery//some-image-id/width=100,height=300` and assumes Flexible variants feature is turned on. @@ -67,12 +64,12 @@ This example lets you rewrite a request from `example.com/images/some-image-id/w To create a rule: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and website. -2. Select **Rules** > **Transform Rules**. -3. Select **Create rule**. -4. Under **When incoming requests match...**, select **Edit expression**. +2. Go to **Rules** > **Overview**. +3. Next to **URL Rewrite Rules**, select **Create rule**. +4. Under **If incoming requests match**, select **Custom filter expression** and then select **Edit expression**. 5. In the text field, enter `(http.request.uri.path matches "^/images/.*$")`. 6. Under **Path**, select **Rewrite to**. -7. Select *Dynamic* and enter the following in the text field. +7. Select _Dynamic_ and enter the following in the text field. ```txt regex_replace( diff --git a/src/content/docs/images/transform-images/serve-images-custom-paths.mdx b/src/content/docs/images/transform-images/serve-images-custom-paths.mdx index 8858800ce0cfe7..11970bc258a997 100644 --- a/src/content/docs/images/transform-images/serve-images-custom-paths.mdx +++ b/src/content/docs/images/transform-images/serve-images-custom-paths.mdx @@ -6,18 +6,17 @@ sidebar: head: - tag: title content: Serve images from custom paths - --- You can use Transform Rules to rewrite URLs for every image that you transform through Images. This page covers examples for the following scenarios: -* Serve images from custom paths -* Modify existing URLs to be compatible with transformations in Images -* Transform every image requested on your zone with Images +- Serve images from custom paths +- Modify existing URLs to be compatible with transformations in Images +- Transform every image requested on your zone with Images -To create a rule, log in to the Cloudflare dashboard and select your account and website. Then, select **Rules** > **Transform Rules**. +To create a rule, log in to the Cloudflare dashboard and select your account and website. Then, go to **Rules** > **Overview** and select **Create rule** next to **URL Rewrite Rules**. ## Before you start @@ -36,7 +35,7 @@ You can use Transform Rules to rewrite URLs. ### Basic version -Free and Pro plans only support string matching rules that do not require regular expressions. +Free and Pro plans support string matching rules (including wildcard operations) that do not require regular expressions. This example lets you rewrite a request from `example.com/images` to `example.com/cdn-cgi/image/`: @@ -44,18 +43,14 @@ This example lets you rewrite a request from `example.com/images` to `example.co (starts_with(http.request.uri.path, "/images")) and (not (any(http.request.headers["via"][*] contains "image-resizing"))) ``` -```txt title="Text in Path > Rewrite to... > Dynamic" +```txt title="Text in Path > Rewrite to > Dynamic" concat("/cdn-cgi/image", substring(http.request.uri.path, 7)) ``` ### Advanced version :::note - - This feature requires a Business or Enterprise plan to enable regex in Transform Rules. Refer to [Cloudflare Transform Rules Availability](/rules/transform/#availability) for more information. - - ::: There is an advanced version of Transform Rules supporting regular expressions. @@ -66,27 +61,23 @@ This example lets you rewrite a request from `example.com/images` to `example.co (http.request.uri.path matches "^/images/.*$") and (not (any(http.request.headers["via"][*] contains "image-resizing"))) ``` -```txt title="Text in Path > Rewrite to... > Dynamic" +```txt title="Text in Path > Rewrite to > Dynamic" regex_replace(http.request.uri.path, "^/images/", "/cdn-cgi/image/") ``` ## Modify existing URLs to be compatible with transformations in Images :::note - - This feature requires a Business or Enterprise plan to enable regex in Transform Rules. Refer to [Cloudflare Transform Rules Availability](/rules/transform/#availability) for more information. - - ::: This example lets you rewrite your URL parameters to be compatible with Images: -``` +```txt (http.request.uri matches "^/(.*)\\?width=([0-9]+)&height=([0-9]+)$") ``` -```txt title="Text in Path > Rewrite to... > Dynamic" +```txt title="Text in Path > Rewrite to > Dynamic" regex_replace( http.request.uri, "^/(.*)\\?width=([0-9]+)&height=([0-9]+)$", @@ -94,24 +85,20 @@ regex_replace( ) ``` -Leave the **Query** > **Rewrite to...** > *Static* field empty. +Leave the **Query** > **Rewrite to** > _Static_ field empty. ## Pass every image requested on your zone through Images :::note - - -This feature requires a Business or Enterprise plan to enable regex in Transform Rules. Refer to [Cloudflare Transform Rules Availability](/rules/transform/#availability) for more information. - - +This feature requires a Business or Enterprise plan to enable regular expressions in Transform Rules. Refer to [Cloudflare Transform Rules Availability](/rules/transform/#availability) for more information. ::: This example lets you transform every image that is requested on your zone with the `format=auto` option: -``` +```txt (http.request.uri.path.extension matches "(jpg)|(jpeg)|(png)|(gif)") and (not (any(http.request.headers["via"][*] contains "image-resizing"))) ``` -```txt title="Text in Path > Rewrite to... > Dynamic" +```txt title="Text in Path > Rewrite to > Dynamic" regex_replace(http.request.uri.path, "/(.*)", "/cdn-cgi/image/format=auto/${1}") ``` diff --git a/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx b/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx index 1b25a5df331481..c50d6a8b96ff46 100644 --- a/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx +++ b/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx @@ -10,13 +10,13 @@ products: To route requests to `/images` on your domain to an AWS S3 bucket: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Navigate to **Rules > Cloud Connector**. +2. Go to **Rules** > **Cloud Connector**. 3. Select **Amazon Web Services - S3** as your [cloud provider](/rules/cloud-connector/providers/). -4. Enter the bucket URL. You can structure this in two ways: +4. Enter the bucket URL. You can structure the URL in two ways: - **Subdomain-style URL**: Set the hostname to `.s3.amazonaws.com`. In this case, your files should be organized in the root of the bucket, meaning the URI path will map directly to the file. For example, `https:///images/file.jpg` will map to `https://.s3.amazonaws.com/images/file.jpg`. - **URI path-style URL**: Set the hostname to `s3.amazonaws.com`. Here, your bucket must include a folder named `images`, and files should be placed inside this folder. The URI path will then include the bucket name, like `https:////images/file.jpg` mapping to `https://s3.amazonaws.com//images/file.jpg`. 5. _(Optional)_ Use the [Rewrite URL](/rules/transform/url-rewrite/) feature of [Transform Rules](/rules/transform/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/images` to `//images` to match the URI path-style URL structure. -6. Click **Next** and enter a descriptive name like `Route images to S3` in **Cloud Connector name**. +6. Select **Next** and enter a descriptive name like `Route images to S3` in **Cloud Connector name**. 7. Under **If**, select **Custom filter expression** and enter the following expression:
`http.request.full_uri wildcard "http*:///images/*"`
Replace `` with desired hostname. diff --git a/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx b/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx index 82be8d29b07a6c..078a50728cfdb2 100644 --- a/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx +++ b/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx @@ -10,13 +10,13 @@ products: To route requests from visitors in the European Union to a Google Cloud Storage bucket: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Go to **Rules > Cloud Connector**. +2. Go to **Rules** > **Cloud Connector**. 3. Select **Google Cloud Platform - Cloud Storage** as your [cloud provider](/rules/cloud-connector/providers/). -4. Enter the bucket URL. You can structure this in two ways: +4. Enter the bucket URL. You can structure the URL in two ways: - **Subdomain-style URL**: For `.storage.googleapis.com`, your files should be organized in the root of the bucket. For example, `https:///index.html` will map to `https://.storage.googleapis.com/index.html`. - **URI path-style URL**: If you set the hostname to `storage.googleapis.com`, your bucket must include folders corresponding to the intended URI paths. For example, if you want `https:///eu/index.html` to map to a file in your bucket, the file should be placed at `https://storage.googleapis.com//eu/index.html`. 5. _(Optional)_ Use the [Rewrite URL](/rules/transform/url-rewrite/) feature of [Transform Rules](/rules/transform/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/eu` to `/` to match the URI path-style URL structure. -6. Click **Next** and enter a descriptive name like "Route EU visitors to GCP" in Cloud Connector name. +6. Select **Next** and enter a descriptive name like `Route EU visitors to GCP` in **Cloud Connector name**. 7. Under **If**, select **Custom filter expression** and enter the following expression: `(ip.src.is_in_european_union)`
This expression targets traffic from European Union users. diff --git a/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx b/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx index 2019c37566f5c7..7a62b0398f7e28 100644 --- a/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx +++ b/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx @@ -10,9 +10,9 @@ products: To serve static assets from an Azure Blob Storage container: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Navigate to **Rules > Cloud Connector**. +2. Navigate to **Rules** > **Cloud Connector**. 3. Select **Microsoft Azure - Blob Storage** as your [cloud provider](/rules/cloud-connector/providers/). -4. Enter the bucket URL. Here’s how to structure it: +4. Enter the bucket URL. Use the following URL structure: - **Subdomain-style URL**: Set the hostname to `.blob.core.windows.net`. In this case, your bucket should include a folder named `static-assets`, and files should be placed inside this folder. For example, `https:///static-assets/style.css` will map to `https://.blob.core.windows.net/static-assets/style.css`. 5. _(Optional)_ Use the [Rewrite URL](/rules/transform/url-rewrite/) feature of [Transform Rules](/rules/transform/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/static-assets` to `/my-pages-project/static-assets` to match the file structure of your object storage bucket. 6. Click **Next** and enter a descriptive name like `Serve static assets from Azure` in **Cloud Connector name**. diff --git a/src/content/docs/rules/compression-rules/create-dashboard.mdx b/src/content/docs/rules/compression-rules/create-dashboard.mdx index c6bc68737361b4..7ca68555576504 100644 --- a/src/content/docs/rules/compression-rules/create-dashboard.mdx +++ b/src/content/docs/rules/compression-rules/create-dashboard.mdx @@ -9,10 +9,11 @@ head: --- 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Compression Rules**. -3. To create a new empty rule, select **Create rule**. To duplicate an existing rule, select the three dots next to it > **Duplicate**. -4. Enter a descriptive name for the rule in **Rule name**. -5. Under **When incoming requests match**, select if you wish to apply the rule to [default content types](/speed/optimization/content/compression/#compression-between-cloudflare-and-website-visitors) (content types that Cloudflare compresses by default), or to requests that match a custom filter expression. -6. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit rule expressions](/ruleset-engine/rules-language/expressions/edit-expressions/). -7. Under **Compression options**, set the [compression options](/rules/compression-rules/settings/#dashboard-configuration-settings). -8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +2. Go to **Rules** > **Overview**. +3. Next to **Compression Rules**, select **Create rule**. +4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. +5. Enter a descriptive name for the rule in **Rule name**. +6. Under **When incoming requests match**, select if you wish to apply the rule to [default content types](/speed/optimization/content/compression/#compression-between-cloudflare-and-website-visitors) (content types that Cloudflare compresses by default), or to requests that match a custom filter expression. +7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit rule expressions](/ruleset-engine/rules-language/expressions/edit-expressions/). +8. Under **Compression options**, set the [compression options](/rules/compression-rules/settings/#dashboard-configuration-settings). +9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. diff --git a/src/content/docs/rules/configuration-rules/create-dashboard.mdx b/src/content/docs/rules/configuration-rules/create-dashboard.mdx index e4f430beaf586f..26155bba80fb25 100644 --- a/src/content/docs/rules/configuration-rules/create-dashboard.mdx +++ b/src/content/docs/rules/configuration-rules/create-dashboard.mdx @@ -9,8 +9,8 @@ head: --- 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Configuration Rules**. -3. To create a new empty rule, select **Create rule**. To duplicate an existing rule, select the three dots next to it > **Duplicate**. +2. Go to **Rules** > **Overview**. +3. Next to **Configuration Rules**, select **Create rule**. 4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. 5. Enter a descriptive name for the rule in **Rule name**. 6. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. diff --git a/src/content/docs/rules/normalization/manage.mdx b/src/content/docs/rules/normalization/manage.mdx index 47ddf62d043d35..9a5af94ac0d225 100644 --- a/src/content/docs/rules/normalization/manage.mdx +++ b/src/content/docs/rules/normalization/manage.mdx @@ -9,7 +9,7 @@ description: How to configure URL normalization in the Cloudflare dashboard. 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. -2. Go to **Rules** > **URL Normalization**. +2. Go to **Rules** > **Overview** > **URL Normalization**. 3. Configure the [available URL normalization settings](/rules/normalization/settings/). diff --git a/src/content/docs/rules/origin-rules/create-dashboard.mdx b/src/content/docs/rules/origin-rules/create-dashboard.mdx index 5a34a10c1be952..0bfeb61f137dfd 100644 --- a/src/content/docs/rules/origin-rules/create-dashboard.mdx +++ b/src/content/docs/rules/origin-rules/create-dashboard.mdx @@ -9,8 +9,8 @@ head: --- 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Origin Rules**. -3. To create a new empty rule, select **Create rule**. To duplicate an existing rule, select the three dots next to it > **Duplicate**. +2. Go to **Rules** > **Overview**. +3. Next to **Origin Rules**, select **Create rule**. 4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. 5. Enter a descriptive name for the rule in **Rule name**. 6. Under **When incoming requests match**, define the [rule expression](/ruleset-engine/rules-language/expressions/edit-expressions/). diff --git a/src/content/docs/rules/origin-rules/examples/change-uri-path-and-host-header.mdx b/src/content/docs/rules/origin-rules/examples/change-uri-path-and-host-header.mdx index ac3750b39600ea..5e5b6c2139a5de 100644 --- a/src/content/docs/rules/origin-rules/examples/change-uri-path-and-host-header.mdx +++ b/src/content/docs/rules/origin-rules/examples/change-uri-path-and-host-header.mdx @@ -6,18 +6,17 @@ description: Learn how to adjust the URI path and `Host` header for incoming req products: - Transform Rules - Origin Rules - --- -import { Example } from "~/components" +import { Example } from "~/components"; To change URI Path and Host Header on incoming requests simultaneously: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Create a **Transform Rule**: - - Navigate to **Rules > Transform Rules**. - - Click on the **Rewrite URL** tab and select **Create rule**. - - Configure the rule to modify the path. For instance, to remove `/uploads` from the path: +2. Create a URL rewrite: + - Navigate to **Rules** > **Overview**. + - Next to **URL Rewrite Rules**, select **Create rule** . + - Configure the rule to modify the path. For instance, to remove `/uploads` from the path: @@ -27,7 +26,7 @@ Text in **Expression Editor**: raw.http.request.uri.path matches "^/uploads/.*" ``` -Text after **Path** > **Rewrite to...** > *Dynamic*: +Text after **Path** > **Rewrite to** > _Dynamic_: ```txt regex_replace(raw.http.request.uri.path, "^/uploads/", "/") @@ -38,9 +37,9 @@ regex_replace(raw.http.request.uri.path, "^/uploads/", "/") The `regex_replace()` [function](/ruleset-engine/rules-language/functions/#regex_replace) replaces the `/uploads/` part of the path with `/`, changing `/uploads/example.jpg` to `/example.jpg`. 3. Create an **Origin Rule**: - - If routing traffic to an object storage bucket, use [Cloud Connector](/rules/cloud-connector). Otherwise, navigate to **Rules > Origin Rules**. - - Click **Create rule** and select **Host Header > Rewrite to...** - - Configure the rule to modify the Host header to desired hostname: + - If routing traffic to an object storage bucket, use [Cloud Connector](/rules/cloud-connector/). Otherwise, navigate to **Rules** > **Overview**. + - Next to **Origin Rules**, select **Create rule**, and then select **Host Header** > **Rewrite to**. + - Configure the rule to modify the Host header to desired hostname: @@ -50,7 +49,7 @@ Text in **Expression Editor**: raw.http.request.uri.path matches "^/uploads/.*" ``` -Text after **Host Header** > **Rewrite to...**: +Text after **Host Header** > **Rewrite to**: ```txt example.com @@ -61,13 +60,14 @@ This will set [the Host header](/rules/origin-rules/features/#host-header) to `e **Optional:** To route requests to a different origin (DNS target), use [DNS override](/rules/origin-rules/features/#dns-record): -Text after **DNS Record** > **Override to...**: +Text after **DNS Record** > **Override to**: ```txt example.com ``` This will route requests to the DNS target of `example.com` instead of your default [DNS record](/dns/manage-dns-records/how-to/create-dns-records/). + This setup routes traffic from `https:///uploads/*` to `https:///*`. Ensure the filters for [Transform Rules](/rules/transform/) and [Origin Rules](/rules/origin-rules/) (or [Cloud Connector](/rules/cloud-connector/)) are precise to avoid unintended rule executions. diff --git a/src/content/docs/rules/transform/manage.mdx b/src/content/docs/rules/transform/manage.mdx index 5c1cefd38dbe2d..eb1005a6189f00 100644 --- a/src/content/docs/rules/transform/manage.mdx +++ b/src/content/docs/rules/transform/manage.mdx @@ -3,34 +3,30 @@ pcx_content_type: reference title: Work with Transform Rules sidebar: order: 5 - --- -You can perform the following operations in the **Transform Rules** page: - -* Create new rewrite URL rules, HTTP request header modification rules, and HTTP response header modification rules. -* Configure Managed Transforms. -* View a list of existing rules (both active and paused). -* Activate or pause rules (turn on or off). -* Edit rules. -* Delete rules. -* Reorder rules. +You can perform the following operations in the **Rules** > **Overview** page: -![The Transform Rules page in the Cloudflare dashboard](~/assets/images/rules/transform/transform-rules-tab.png) +- Create new rewrite URL rules, HTTP request header modification rules, and HTTP response header modification rules. +- View a list of existing rules (both active and paused). +- Activate or pause rules (turn on or off). +- Edit rules. +- Delete rules. +- Reorder rules. ## Create rules -In **Rules** > **Transform Rules** you can create the following rules: +In **Rules** > **Overview** you can create the following rules, among others: -* [Rewrite URL rules](/rules/transform/url-rewrite/create-dashboard/) -* [HTTP request header modification rules](/rules/transform/request-header-modification/create-dashboard/) -* [HTTP response header modification rules](/rules/transform/response-header-modification/create-dashboard/) +- [Rewrite URL rules](/rules/transform/url-rewrite/create-dashboard/) +- [HTTP request header modification rules](/rules/transform/request-header-modification/create-dashboard/) +- [HTTP response header modification rules](/rules/transform/response-header-modification/create-dashboard/) Refer to each linked section for details on creating each rule type. ## Turn on or off a rule -Select the **Enabled** toggle next to the rule to turn it on or off. +Select the three dots next to the rule, and then select **Enable** or **Disable** to turn the rule on or off. ## Edit a rule @@ -42,6 +38,6 @@ To delete a rule, select the three dots menu > **Delete** next to the rule you w ## Order rules -Cloudflare evaluates each type of Transform Rules in list order, where rules are evaluated in the order they appear in the Rules List. You can drag and drop Transform Rules into position to reorder them using the handle next to each rule. +Cloudflare evaluates each type of Transform Rules in list order, where rules are evaluated in the order they appear in the rules list. You can drag and drop rules into position to reorder them using the handle next to each rule. To specify an exact rule position, select the three dots menu > **Move to** and enter the new rule position. diff --git a/src/content/docs/rules/transform/managed-transforms/configure.mdx b/src/content/docs/rules/transform/managed-transforms/configure.mdx index 03378aa38c2e3f..90cafbe60ee94f 100644 --- a/src/content/docs/rules/transform/managed-transforms/configure.mdx +++ b/src/content/docs/rules/transform/managed-transforms/configure.mdx @@ -13,9 +13,9 @@ import { Details, TabItem, Tabs } from "~/components"; 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. -2. Go to **Rules** > **Transform Rules**. +2. Go to **Rules** > **Overview**. -3. Go to the **Managed Transforms** tab. +3. Next to **URL Rewrite Rules**, select **Manage URL Rewrite Rules** and go to the **Managed Transforms** tab. 4. Enable or disable the [desired Managed Transforms](/rules/transform/managed-transforms/reference/) by selecting the toggle next to each entry. The Cloudflare dashboard will only list available Managed Transforms according to your Cloudflare plan and product subscriptions. diff --git a/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx b/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx index 500745c76ee6f4..a3f3249f4e8ff1 100644 --- a/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx +++ b/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx @@ -6,7 +6,6 @@ sidebar: head: - tag: title content: Create an HTTP request header modification rule in the dashboard - --- Refer to the [Rules examples gallery](/rules/transform/examples/?operation=Request+modification) for examples of rule definitions. @@ -15,30 +14,27 @@ To create a rule: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. -2. Go to **Rules** > **Transform Rules**. - -3. Go to the **Modify Request Header** tab. +2. Go to **Rules** > **Overview**. -4. To create a new empty rule, select **Create rule**. To duplicate an existing rule, select the three dots next to it > **Duplicate**. +3. Next to **Request Header Transform Rules**, select **Create rule**. - ![The HTTP request header modification rule creation page in the Cloudflare dashboard.](~/assets/images/rules/transform/create-request-header-modification-rule.png) +4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. In the rule creation page, enter a descriptive name for the rule in **Rule name**. +5. Enter a descriptive name for the rule in **Rule name**. 6. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. 7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). :::note - - Check the [available fields and functions](/rules/transform/request-header-modification/reference/fields-functions/). + Check the [available fields and functions](/rules/transform/request-header-modification/reference/fields-functions/). ::: 8. For **Modify request header**, select one of the following options: - * *Set static* — Sets the value of an HTTP request header to a static string value. Overrides the value of an existing header with the same name or adds a new header if it does not exist. - * *Set dynamic* — Sets the value of an HTTP request header according to the provided expression. Overrides the value of an existing header with the same name or adds a new header if it does not exist. - * *Remove* — Removes the HTTP request header with the provided name, if it exists. + - _Set static_ — Sets the value of an HTTP request header to a static string value. Overrides the value of an existing header with the same name or adds a new header if it does not exist. + - _Set dynamic_ — Sets the value of an HTTP request header according to the provided expression. Overrides the value of an existing header with the same name or adds a new header if it does not exist. + - _Remove_ — Removes the HTTP request header with the provided name, if it exists. 9. Enter the name of the HTTP request header to modify in **Header name** and the static value or expression in **Value**, if you are setting the header value. diff --git a/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx b/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx index df7d72e44573c8..45bb9c7a5d6123 100644 --- a/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx +++ b/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx @@ -6,7 +6,6 @@ sidebar: head: - tag: title content: Create an HTTP response header modification rule in the dashboard - --- Refer to the [Rules examples gallery](/rules/transform/examples/?operation=Response+modification) for examples of rule definitions. @@ -15,31 +14,28 @@ To create a rule: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. -2. Go to **Rules** > **Transform Rules**. - -3. Go to the **Modify Response Header** tab. +2. Go to **Rules** > **Overview**. -4. To create a new empty rule, select **Create rule**. To duplicate an existing rule, select the three dots next to it > **Duplicate**. +3. Next to **Response Header Transform Rules**, select **Create rule**. - ![The HTTP response header modification rule creation page in the Cloudflare dashboard.](~/assets/images/rules/transform/create-response-header-modification-rule.png) +4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. In the rule creation page, enter a descriptive name for the rule in **Rule name**. +5. Enter a descriptive name for the rule in **Rule name**. 6. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. 7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). :::note - - Check the [available fields and functions](/rules/transform/response-header-modification/reference/fields-functions/). + Check the [available fields and functions](/rules/transform/response-header-modification/reference/fields-functions/). ::: 8. For **Modify response header**, select one of the following operations: - * *Set static* — Sets the value of an HTTP response header to a static string value. Overrides the value of any existing headers with the same name or adds a new header if it does not exist. - * *Set dynamic* — Sets the value of an HTTP response header according to the provided expression. Overrides the value of any existing headers with the same name or adds a new header if it does not exist. - * *Add* — Adds an HTTP response header with a static string value. This operation will not remove any existing response headers with the same name. - * *Remove* — Removes the HTTP response header with the provided name, if it exists. + - _Set static_ — Sets the value of an HTTP response header to a static string value. Overrides the value of any existing headers with the same name or adds a new header if it does not exist. + - _Set dynamic_ — Sets the value of an HTTP response header according to the provided expression. Overrides the value of any existing headers with the same name or adds a new header if it does not exist. + - _Add_ — Adds an HTTP response header with a static string value. This operation will not remove any existing response headers with the same name. + - _Remove_ — Removes the HTTP response header with the provided name, if it exists. 9. Enter the name of the HTTP response header to modify in **Header name** and the static value or expression in **Value**, if you are setting the header value. diff --git a/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx b/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx index e0325b82d66ba6..ab17a8bcb0c885 100644 --- a/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx +++ b/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx @@ -14,15 +14,17 @@ To create a rule: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. -2. Go to **Rules** > **Transform Rules**. +2. Go to **Rules** > **Overview**. -3. To create a new empty rule, select **Create rule**. To duplicate an existing rule, select the three dots next to it > **Duplicate**. +3. Next to **URL Rewrite Rules**, select **Create rule**. -4. In the rule creation page, enter a descriptive name for the rule in **Rule name**. +4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. + +5. Enter a descriptive name for the rule in **Rule name**. ![The rewrite URL rule creation page in the Cloudflare dashboard.](~/assets/images/rules/transform/create-url-rewrite-rule.png) -5. Under **If incoming requests match**, select one of the following options: +6. Under **If incoming requests match**, select one of the following options: - **Wildcard pattern**: The rule will only apply to traffic matching the wildcard pattern in **Request URL**. Refer to [Wildcard pattern parameters](#wildcard-pattern-parameters) for details. @@ -34,19 +36,19 @@ To create a rule: - **All incoming requests**: The rule will apply to all traffic. -6. (Optional) Define the action for your rewrite URL rule by selecting one of the available options displayed as radio buttons, and then a value from the drop-down list, depending on the action: +7. (Optional) Define the action for your rewrite URL rule by selecting one of the available options displayed as radio buttons, and then a value from the drop-down list, depending on the action: - If you select **Rewrite to** > _Static_, enter the string that will replace the original URL path (or query string). For example, enter `welcome-gb.html` to rewrite the original URL path to `/welcome-gb.html`. - If you select **Rewrite to** > _Dynamic_, enter a [rewrite expression](/rules/transform/url-rewrite/reference/fields-functions/#rewrite-expressions) that defines the dynamic URL rewrite to perform. - - If you do not want to change the value of a component of the original request (the URL path or the URL query string), choose the _Preserve_ action for that component. + - If you do not want to change the value of a component of the original request (the URL path or the URL query string), choose _Preserve_ for that component. For more information, refer to [URL rewrite parameters](/rules/transform/url-rewrite/reference/parameters/). -7. Under **Place at**, define where to place the rule in the rules list: first rule in the list, last rule in the list, or in a custom position (after a given rule). +8. (Optional) Under **Place at**, define where to place the rule in the rules list: first rule in the list, last rule in the list, or in a custom position (after a given rule). -8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. If you choose to deploy your rewrite URL rule, the new rule will be enabled. If you save the rule as a draft, the new rule will be disabled. diff --git a/src/content/docs/rules/url-forwarding/bulk-redirects/create-dashboard.mdx b/src/content/docs/rules/url-forwarding/bulk-redirects/create-dashboard.mdx index 20e452fc4dcfce..622309ba11c746 100644 --- a/src/content/docs/rules/url-forwarding/bulk-redirects/create-dashboard.mdx +++ b/src/content/docs/rules/url-forwarding/bulk-redirects/create-dashboard.mdx @@ -16,7 +16,10 @@ To create Bulk Redirects in the Cloudflare dashboard you must: You can create Bulk Redirect Lists and Bulk Redirect Rules in the Cloudflare dashboard: - At the account level, in **Bulk Redirects**. -- At the zone level, in **Rules** > **Redirect Rules** (**Bulk Redirects** tab). +- At the zone level: + 1. Go to **Rules** > **Overview**. + 2. Next to **Redirect Rules** select **Manage Redirect Rules**. + 3. Select the **Bulk Redirects** tab. However, the lists and rules only exist at the account level and every zone in the same account will show the same items. diff --git a/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx b/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx index feb6698746aea8..f153fe4fd21ef8 100644 --- a/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx +++ b/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx @@ -9,8 +9,8 @@ sidebar: import { Render } from "~/components"; 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Redirect Rules**. -3. In the **Single Redirects** tab, select **Create rule** to create a new empty rule. To duplicate an existing rule, select the three dots next to it > **Duplicate**. +2. Go to **Rules** > **Overview**. +3. Next to **Redirect Rules**, select **Create rule**. 4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. 5. Enter a descriptive name for the rule in **Rule name**. 6. Under **When incoming requests match**, select one of the following options: diff --git a/src/content/docs/ssl/troubleshooting/general-ssl-errors.mdx b/src/content/docs/ssl/troubleshooting/general-ssl-errors.mdx index c36b6018371d16..9d5c72bd02bf42 100644 --- a/src/content/docs/ssl/troubleshooting/general-ssl-errors.mdx +++ b/src/content/docs/ssl/troubleshooting/general-ssl-errors.mdx @@ -116,10 +116,11 @@ The HSTS headers (`Strict-Transport-Security` and `X-Content-Type-Options`) in t You may have configured [HTTP Response Header Modification Rules](/rules/transform/response-header-modification) that are overriding the HSTS header values defined in the **SSL/TLS** app. -1. Go to **Rules** > **Transform Rules**. -2. Under **HTTP Response Header Modification**, check the existing rules for a rule that is setting the value of one of the HSTS headers (`Strict-Transport-Security` or `X-Content-Type-Options`). -3. Delete (or edit) the rule so that the HSTS configuration settings defined in the **SSL/TLS** app are applied. -4. Repeat this procedure for the other HSTS header. +1. Go to **Rules** > **Overview**. +2. Next to **Response Header Transform Rules**, select **Manage Response Header Transform Rules**. +3. Check the existing rules for a rule that is setting the value of one of the HSTS headers (`Strict-Transport-Security` or `X-Content-Type-Options`). +4. Delete (or edit) the rule so that the HSTS configuration settings defined in the **SSL/TLS** app are applied. +5. Repeat this procedure for the other HSTS header. ---