Skip to content

Conversation

@pedrosousa
Copy link
Contributor

@pedrosousa pedrosousa commented Apr 11, 2025

Summary

Addresses PCX-13585.
Creates a tutorials section in Origin Rules with two new tutorials.

Additional changes:

  • Creates two new examples based on rule templates available in the Cloudflare dashboard.
  • Converts one existing example into a tutorial (it involves two different products).

@pedrosousa pedrosousa requested review from a team, GregBrimble, KianNH and WalshyDev as code owners April 11, 2025 14:55
@github-actions github-actions bot added product:rules Related to rules size/l labels Apr 11, 2025
@pedrosousa pedrosousa changed the title Pedro/pcx 13585 rules origin rules tutorials [Rules] Add two Origin Rules tutorials Apr 11, 2025
@github-actions
Copy link
Contributor

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /rules/origin-rules/examples/change-uri-path-and-host-header/

@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Apr 11, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Updated origin rules documentation to enhance clarity and usability, including new examples and tutorials.

  • Modified existing documentation to include examples for changing HTTP Host header and destination port.
  • Added new tutorials for changing URI paths and Host headers, and for pointing to custom domains.
  • Updated FAQ and features sections to reflect recent changes and improvements.

Modified Files

  • src/content/docs/rules/origin-rules/create-api.mdx
  • src/content/docs/rules/origin-rules/examples/index.mdx
  • src/content/docs/rules/origin-rules/faq.mdx
  • src/content/docs/rules/origin-rules/features.mdx
  • src/content/docs/rules/origin-rules/parameters.mdx

Added Files

  • src/content/docs/rules/origin-rules/examples/change-http-host-header.mdx
  • src/content/docs/rules/origin-rules/examples/change-port.mdx
  • src/content/docs/rules/origin-rules/tutorials/change-uri-path-and-host-header.mdx
  • src/content/docs/rules/origin-rules/tutorials/index.mdx
  • src/content/docs/rules/origin-rules/tutorials/point-to-pages-with-custom-domain.mdx
  • src/content/docs/rules/origin-rules/tutorials/point-to-r2-bucket-with-custom-domain.mdx
  • src/content/partials/rules/origin-rules-api-change-host-header.mdx
  • src/content/partials/rules/origin-rules-api-change-port.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 11, 2025

Preview URL: https://8632a9ac.preview.developers.cloudflare.com
Preview Branch URL: https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/rules/origin-rules/tutorials/change-uri-path-and-host-header/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/tutorials/change-uri-path-and-host-header/
https://developers.cloudflare.com/rules/origin-rules/create-api/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/create-api/
https://developers.cloudflare.com/rules/origin-rules/tutorials/point-to-r2-bucket-with-custom-domain/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/tutorials/point-to-r2-bucket-with-custom-domain/
https://developers.cloudflare.com/rules/origin-rules/tutorials/point-to-pages-with-custom-domain/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/tutorials/point-to-pages-with-custom-domain/
https://developers.cloudflare.com/rules/origin-rules/examples/change-uri-path-and-host-header/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/examples/change-uri-path-and-host-header/
https://developers.cloudflare.com/rules/origin-rules/faq/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/faq/
https://developers.cloudflare.com/rules/origin-rules/examples/change-http-host-header/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/examples/change-http-host-header/
https://developers.cloudflare.com/rules/origin-rules/examples/change-port/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/examples/change-port/
https://developers.cloudflare.com/rules/origin-rules/features/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/features/
https://developers.cloudflare.com/rules/origin-rules/tutorials/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/tutorials/
https://developers.cloudflare.com/rules/origin-rules/parameters/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/parameters/
https://developers.cloudflare.com/rules/origin-rules/examples/ https://pedro-pcx-13585-rules-origin-rules-tutorials.preview.developers.cloudflare.com/rules/origin-rules/examples/

@nikitacano nikitacano enabled auto-merge (squash) April 14, 2025 09:46
@@ -0,0 +1,120 @@
---
updated: 2025-02-26
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converted the example into a tutorial, so using the date from the last change to the example.

To add the custom domain to your Pages deployment:

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
2. Go to **Workers & Pages**. and select your Pages project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Go to **Workers & Pages**. and select your Pages project.
2. Go to **Workers & Pages** and select your Pages project.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suggestion was addressed in #21675.

@nikitacano nikitacano merged commit 79b3232 into production Apr 14, 2025
11 checks passed
@nikitacano nikitacano deleted the pedro/PCX-13585-rules-origin-rules-tutorials branch April 14, 2025 15:36
RebeccaTamachiro pushed a commit that referenced this pull request Apr 21, 2025
* [Rules] Convert example into a tutorial

* Move two API examples to partials

* FAQ: Small formatting updates

* Add missing partials (fix previous commit)

* Change page order

* Add two tutorials (origin rules and Pages / R2 with custom domain)

* Unhide tutorials list

* Fix broken links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:rules Related to rules size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants