R2 Access Via Domain is Down?
Howdy! I got a report from some of my users that R2 is no longer serving content. Everything from my custom domain is returning a 200 with 0 bytes (even if the file does not exist).
For example:
https://cdn.btst.io/test.html
I don't know how long this has been happening, but I don't see any evidence reported anywhere?
Is this an issue on y'all's side?

23 Replies
For what it's worth, workers fetching from R2 seem to be working fine. I would hate to rearchitect during downtime, but that seems like a viable path at this point.
I can't reproduce this with a custom domain, and the fact it also serves a
200 OK
on /
despite /
having never worked on custom domains is weird.
What is the CORS config on that bucket?
I suspect this isn't actually hitting R2, especially since it's serving CORS headers without me passing an Origin header.I just swapped cdn.btst.io over to a worker, so it's working now.
cdn2.btst.io is pointed at the bucket now and still showing the weird behavior

Yeah, super weird issue haha. It was working up until tonight though haha
See what https://developers.cloudflare.com/fundamentals/basic-tasks/trace-request/ says, you'll have the trace tool on the sidebar in the dashboard.
That's a cool little service!

Same response for the working one with a worker, FWIW
This still seems to be affected. I just realized that my less popular sites have broken R2 bucket CDNs as well š
@Sid | R2 might be able to help - I don't think the traffic is hitting R2, but I also don't have the ability to figure out why it isn't going to R2.
Thanks! That'd be helpful!! Am I asking in the right place? Or should I escalate / push somewhere else / wait for Sid?
I am not super confident that I found the proper channel š
I'm also quite surprised that nobody else has reported.
I would be surprised if it's affecting anyone else but you.
I can't repro it and there's no other reports on the community forums or here
You'd probably be better off posting in #r2
Ah good to know! I wonder if a newer worker route is matching the cdn urls
Ugh. Indeed. I had a worker route added that started trapping requests before they made it to R2 š
It's so interesting to me the way that worker routes are global across all subdomains.

Anyways, thanks for your help @kian !!
*/*
would be expected to match everything
You might want to scope it down to a more specific hostnameOh yeah, I knocked it down. That originally came from some experiments with the "SaaS custom domain routes" for workers
Unfortunately the trace tool you used earlier doesn't yet tell you if a Worker route was matched
You kinda need a wildcard to catch those routes for whatever domains a SaaS user puts in and you want to run your worker on
Which basically means you need a dedicated TLD per function to run a SaaS w/ custom domains on. Unless I'm missing something or you add a route for each domain
You can do
*btst.io/*
, Service: none to stop it from taking over subdomains for that domain, the more specific one wins
docs: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/start/advanced-settings/worker-as-origin/Workers as your fallback origin Ā· Cloudflare for Platforms docs
Learn how to use a Worker as the fallback origin for your SaaS zone.
Thanks @Chaika ! Is there something like a "not match" blocker, so I can do a
*
that matches SaaS domains, without matching domains on my TLD?
In my testing SaaS domains (i.e. user provided domains), I needed a matching rule defined in order for my worker to serve traffic to themRight, like the tutorial there says, you can make one more specific like
*.<zonename>.com/*
service none along with the */*
for SaaS, and the more specific one wins (so service none will apply to your own domain)Ohhh I missed that nuance! That "None" is super helpful, thanks!