Wildcard DNS + Worker + R2 custom domain
Hi,
I have a wildcard DNS set
AAAA * 100::
and a worker with route *domain.com/*
; my worker handles all requests to domain.com
and any subdomain user1.domain.com
. I've enabled a custom domain for an R2 bucket at assets.domain.com
; the Cloudflare dashboard said "You currently have a wildcard record for *.domain.com. While the record will remain, requests to assets.domain.com will now be served from your R2 bucket.". The entry for R2 indeed appeared on the DNS configuration page. However, requests to assets.domain.com
are still directed to the worker. How can I resolve this? I need the worker to continue handling all subdomain requests except for assets
. Thanks.3 Replies
Trace shows this ↑
The routing documentation says
>A route can be specified without being associated with a Worker. This will act to negate any less specific patterns.
But how to enable this? I.e. how to create a route that is not attached to a worker?
Cloudflare Docs
Routes | Cloudflare Workers docs
Routes allow users to map a URL pattern to a Worker. When a request comes in to the Cloudflare network that matches the specified URL pattern, your Worker will execute on that route.