Then configure the following:
- Log in to the Cloudflare Dashboard and navigate to the R2 section.
- Create a new bucket and note down the Bucket name and Region.
- Go to
R2 > Access Keysand create a new pair. Save the Access Key ID and Secret Access Key. - Find your R2 Endpoint — it's typically in the format:
https://<accountid>.r2.cloudflarestorage.com. - Next up, in order to enable CDN and public access, you need to setup a custom R2 domain and fill it in over the R2 Custom Url field.
Once all fields are configured, your storage will be routed through Cloudflare R2.
Notes:
• Make sure you add your endpoint/cdn domain to the CORS policy.
• If using CDN & while "Under attack mode", you might need a custom WAF rule like (http.host eq "cdn.domain.com") with Skip action.