Hi, i have a question about the rules
Hi, i have a question about the rules and R2, I have a rule that redirects all traffic on my domain. But i want to setup a custom domain for R2 storage and i want that the traffic on this domain is not redirecting, but showing the content. Will this custom domain thing overwrite the CloudFlare Rule?
1 Reply
Your redirect rule should still work on a hostname mapped to R2 custom domain. However, you can have more granular control if you route traffic to R2 using Cloud Connector: https://developers.cloudflare.com/rules/cloud-connector/.
This way you can use R2 custom domain on a hostname that is not exposed to end-users, and configure a rule in Cloud Connector that controls which requests (based on visitor's country, header, URL, etc.) should go to R2 versus other places.
Cloudflare Docs
Cloud Connector (beta) · Cloudflare Rules docs
Cloud Connector (beta) allows you to route matching incoming traffic from your website to a public cloud provider that you define: Cloudflare R2 object storage or an external provider such as AWS, Google Cloud, and Azure. With Cloud Connector you can make Cloudflare the control center for your web traffic, including traffic served from public cl...