Skip to content

Commit dcebdd8

Browse files
authored
[Rules] Use DashButton in zone-level instructions (#25380)
1 parent 7b4b82d commit dcebdd8

File tree

21 files changed

+249
-202
lines changed

21 files changed

+249
-202
lines changed

src/content/docs/rules/cloud-connector/create-dashboard.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,36 @@ head:
88
content: Configure a Cloud Connector rule in the dashboard
99
---
1010

11-
import { Render, Steps } from "~/components";
11+
import { Render, Steps, DashButton } from "~/components";
1212

1313
To configure a Cloud Connector rule in the dashboard:
1414

1515
<Steps>
1616

17-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain.
17+
1. In the Cloudflare dashboard, go to the **Cloud Connector** page.
1818

19-
2. Go to **Rules** > **Cloud Connector**.
19+
<DashButton url="/?to=/:account/:zone/rules/cloud-connector" />
2020

21-
3. Select your [cloud provider](/rules/cloud-connector/providers/) (Cloudflare R2 or an external provider).
21+
2. Select your [cloud provider](/rules/cloud-connector/providers/) (Cloudflare R2 or an external provider).
2222

23-
4. If you selected Cloudflare R2 in the previous step, select your bucket and your custom domain, and select **Next**.<br/>
23+
3. If you selected Cloudflare R2 in the previous step, select your bucket and your custom domain, and select **Next**.<br/>
2424
If you selected a different storage provider, enter the bucket URL and select **Next**.
2525

2626
:::caution
2727
The bucket URL must follow a [specific format](/rules/cloud-connector/providers/) according to your provider.
2828
:::
2929

30-
5. Enter a descriptive name for the rule in **Cloud Connector name**.
30+
4. Enter a descriptive name for the rule in **Cloud Connector name**.
3131

32-
6. Under **If**, select **Custom filter expression** and [enter an expression](/ruleset-engine/rules-language/expressions/edit-expressions/) to define the traffic that will be redirected to the bucket. For example:
32+
5. Under **If**, select **Custom filter expression** and [enter an expression](/ruleset-engine/rules-language/expressions/edit-expressions/) to define the traffic that will be redirected to the bucket. For example:
3333
- To route all requests matching `http*://example.com/images/*` (HTTPS and HTTP requests) you could enter the following expression:<br/>
3434
`http.request.full_uri wildcard "http*://example.com/images/*"`
3535
- To route all requests matching `http*://images.example.com/*` (HTTPS and HTTP requests) you could enter the following expression:<br/>
3636
`http.request.full_uri wildcard "http*://images.example.com/*"`
3737

3838
Alternatively, select **All incoming requests** to redirect all incoming traffic for your zone to the storage bucket you selected.
3939

40-
7. To save and deploy your rule, select **Deploy**. If you are not ready to deploy the rule, select **Save as Draft**.
40+
6. To save and deploy your rule, select **Deploy**. If you are not ready to deploy the rule, select **Save as Draft**.
4141

4242
<Render file="rules-creation-dash-dns-popup" product="rules" />
4343

src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,30 @@ products:
77
- Cloud Connector
88
---
99

10-
import { Steps } from "~/components";
10+
import { Steps, DashButton } from "~/components";
1111

1212
To route requests to `/images` on your domain to an AWS S3 bucket:
1313

1414
<Steps>
1515

16-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain.
17-
2. Go to **Rules** > **Cloud Connector**.
18-
3. Select **Amazon Web Services - S3** as your [cloud provider](/rules/cloud-connector/providers/).
19-
4. Enter the bucket URL. You can structure the URL in two ways:
16+
1. In the Cloudflare dashboard, go to the **Cloud Connector** page.
17+
18+
<DashButton url="/?to=/:account/:zone/rules/cloud-connector" />
19+
20+
2. Select **Amazon S3** as your [cloud provider](/rules/cloud-connector/providers/).
21+
3. Enter the bucket URL. You can structure the URL in two ways:
2022
- **Subdomain-style URL**: Set the hostname to `<BUCKET_NAME>.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://<YOUR_HOSTNAME>/images/file.jpg` will map to `https://<BUCKET_NAME>.s3.amazonaws.com/images/file.jpg`.
2123
- **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://<YOUR_HOSTNAME>/<BUCKET_NAME>/images/file.jpg` mapping to `https://s3.amazonaws.com/<BUCKET_NAME>/images/file.jpg`.
22-
5. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/images` to `/<BUCKET_NAME>/images` to match the URI path-style URL structure.
23-
6. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/images/*` URI path for seven days:
24+
4. (Optional) Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/images` to `/<BUCKET_NAME>/images` to match the URI path-style URL structure.
25+
5. (Optional) Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/images/*` URI path for seven days:
2426
- **If incoming requests match** > Custom filter expression: `(starts_with(http.request.uri.path, "/images/"))`
2527
- **Cache eligibility**: Eligible for cache
2628
- **Edge TTL** > Ignore cache-control header and use this TTL: _7 days_
27-
7. Select **Next** and enter a descriptive name like `Route images to S3` in **Cloud Connector name**.
28-
8. Under **If**, select **Custom filter expression** and enter the following expression:<br />
29+
6. Select **Next** and enter a descriptive name like `Route images to S3` in **Cloud Connector name**.
30+
7. Under **If**, select **Custom filter expression** and enter the following expression:<br />
2931
`http.request.full_uri wildcard "http*://<YOUR_HOSTNAME>/images/*"`<br />
3032
Replace `<YOUR_HOSTNAME>` with desired hostname.
31-
9. Select **Deploy** to activate the rule.
33+
8. Select **Deploy** to activate the rule.
3234

3335
</Steps>
3436

src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,27 @@ products:
77
- Cloud Connector
88
---
99

10-
import { Steps } from "~/components";
10+
import { Steps, DashButton } from "~/components";
1111

1212
To route requests from visitors in the European Union to a Google Cloud Storage bucket:
1313

1414
<Steps>
1515

16-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain.
17-
2. Go to **Rules** > **Cloud Connector**.
18-
3. Select **Google Cloud Platform - Cloud Storage** as your [cloud provider](/rules/cloud-connector/providers/).
19-
4. Enter the bucket URL. You can structure the URL in two ways:
16+
1. In the Cloudflare dashboard, go to the **Cloud Connector** page.
17+
18+
<DashButton url="/?to=/:account/:zone/rules/cloud-connector" />
19+
20+
2. Select **Google Cloud Storage** as your [cloud provider](/rules/cloud-connector/providers/).
21+
3. Enter the bucket URL. You can structure the URL in two ways:
2022
- **Subdomain-style URL**: For `<BUCKET_NAME>.storage.googleapis.com`, your files should be organized in the root of the bucket. For example, `https://<YOUR_HOSTNAME>/index.html` will map to `https://<BUCKET_NAME>.storage.googleapis.com/index.html`.
2123
- **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://<YOUR_HOSTNAME>/eu/index.html` to map to a file in your bucket, the file should be placed at `https://storage.googleapis.com/<BUCKET_NAME>/eu/index.html`.
22-
5. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/eu` to `/<BUCKET_NAME>` to match the URI path-style URL structure.
23-
6. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/eu` URI path for seven days (defined through the **Edge TTL** setting).
24-
7. Select **Next** and enter a descriptive name like `Route EU visitors to GCP` in **Cloud Connector name**.
25-
8. Under **If**, select **Custom filter expression** and enter the following expression:
24+
4. (Optional) Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/eu` to `/<BUCKET_NAME>` to match the URI path-style URL structure.
25+
5. (Optional) Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/eu` URI path for seven days (defined through the **Edge TTL** setting).
26+
6. Select **Next** and enter a descriptive name like `Route EU visitors to GCP` in **Cloud Connector name**.
27+
7. Under **If**, select **Custom filter expression** and enter the following expression:
2628
`(ip.src.is_in_european_union)`<br />
2729
This expression targets traffic from European Union users.
28-
9. Select **Deploy** to activate the rule.
30+
8. Select **Deploy** to activate the rule.
2931

3032
</Steps>
3133

src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@ products:
77
- Cloud Connector
88
---
99

10-
import { Steps } from "~/components";
10+
import { Steps, DashButton } from "~/components";
1111

1212
To serve static assets from an Azure Blob Storage container:
1313

1414
<Steps>
1515

16-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain.
17-
2. Navigate to **Rules** > **Cloud Connector**.
18-
3. Select **Microsoft Azure - Blob Storage** as your [cloud provider](/rules/cloud-connector/providers/).
19-
4. Enter the bucket URL. Use the following URL structure:
16+
1. In the Cloudflare dashboard, go to the **Cloud Connector** page.
17+
18+
<DashButton url="/?to=/:account/:zone/rules/cloud-connector" />
19+
20+
2. Select **Microsoft Azure** as your [cloud provider](/rules/cloud-connector/providers/).
21+
3. Enter the bucket URL. Use the following URL structure:
2022
- **Subdomain-style URL**: Set the hostname to `<BUCKET_NAME>.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://<YOUR_HOSTNAME>/static-assets/style.css` will map to `https://<BUCKET_NAME>.blob.core.windows.net/static-assets/style.css`.
21-
5. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) 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.
22-
6. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/static-assets` URI path for seven days (defined through the **Edge TTL** setting).
23-
7. Click **Next** and enter a descriptive name like `Serve static assets from Azure` in **Cloud Connector name**.
24-
8. Under **If**, select **Custom filter expression** and enter the following expression:
23+
4. (Optional) Use [URL Rewrite Rules](/rules/transform/url-rewrite/) 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.
24+
5. (Optional) Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/static-assets` URI path for seven days (defined through the **Edge TTL** setting).
25+
6. Click **Next** and enter a descriptive name like `Serve static assets from Azure` in **Cloud Connector name**.
26+
7. Under **If**, select **Custom filter expression** and enter the following expression:
2527
`http.request.full_uri wildcard "http*://<YOUR_HOSTNAME>/static-assets/*"`<br />
26-
9. Select **Deploy** to activate the rule.
28+
8. Select **Deploy** to activate the rule.
2729

2830
</Steps>
2931

src/content/docs/rules/compression-rules/create-dashboard.mdx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@ sidebar:
66
label: Create a rule in the dashboard
77
---
88

9-
import { Render, Steps } from "~/components";
9+
import { Render, Steps, DashButton } from "~/components";
1010

1111
<Steps>
1212

13-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain.
14-
2. Go to **Rules** > **Overview**.
15-
3. Select **Create rule** > **Compression Rule**.
16-
4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration.
17-
5. Enter a descriptive name for the rule in **Rule name**.
18-
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.
19-
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/).
20-
8. Under **Compression options**, set the [compression options](/rules/compression-rules/settings/#dashboard-configuration-settings).
21-
9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.
13+
1. In the Cloudflare dashboard, go to the Rules **Overview** page.
14+
15+
<DashButton url="/?to=/:account/:zone/rules/overview" />
16+
17+
2. Select **Create rule** > **Compression Rule**.
18+
3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration.
19+
4. Enter a descriptive name for the rule in **Rule name**.
20+
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.
21+
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/).
22+
7. Under **Compression options**, set the [compression options](/rules/compression-rules/settings/#dashboard-configuration-settings).
23+
8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.
2224

2325
<Render file="rules-creation-dash-dns-popup" product="rules" />
2426

25-
</Steps>
27+
</Steps>

src/content/docs/rules/configuration-rules/create-dashboard.mdx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@ sidebar:
66
label: Create a rule in the dashboard
77
---
88

9-
import { Render, Steps } from "~/components";
9+
import { Render, Steps, DashButton } from "~/components";
1010

1111
<Steps>
1212

13-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain.
14-
2. Go to **Rules** > **Overview**.
15-
3. Select **Create rule** > **Configuration Rule**.
16-
4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration.
17-
5. Enter a descriptive name for the rule in **Rule name**.
18-
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.
19-
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/).
20-
8. Under **Then the settings are**, add the [configuration settings](/rules/configuration-rules/settings/) you wish to change for requests matching the rule expression.
21-
9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.
13+
1. In the Cloudflare dashboard, go to the Rules **Overview** page.
14+
15+
<DashButton url="/?to=/:account/:zone/rules/overview" />
16+
17+
2. Select **Create rule** > **Configuration Rule**.
18+
3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration.
19+
4. Enter a descriptive name for the rule in **Rule name**.
20+
5. 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.
21+
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 expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/).
22+
7. Under **Then the settings are**, add the [configuration settings](/rules/configuration-rules/settings/) you wish to change for requests matching the rule expression.
23+
8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.
2224

2325
<Render file="rules-creation-dash-dns-popup" product="rules" />
2426

25-
</Steps>
27+
</Steps>

0 commit comments

Comments
 (0)