Add route to worker for cname'd url

Pages user here.

My Pages site has a custom domain. In the custom domain section, I have a worker.

The custom domain is a-view.org. It cnames to the Pages url, which is a-view-hugo.pages.dev. For preview (non-production) builds the actual URL looks like: 37872bfc.a-view-hugo.pages.dev

The worker is a work around for Pages mis-setting css mime types and so it determines whether the preview site will render correctly in browsers.

The route for the custom domain is: `a-view.org/

I think I would need a route like this for the preview builds: *a-view-hugo.pages.dev/*

When I try to add this route for the worker, I get: Route pattern must include zone name: *a-view-hugo.pages.dev/*

This must be because this url pattern doesn’t seem like it fits the zone a-view.org. It seems sort of weird that I’d need to create a domain for the Pages domain just so I can assign a route for the rule. That’s not really my domain–it’s CloudFlare’s.

Any ideas?

Thanks.

There was a similar post. The suggestion was to just add an ‘a’ record for a suitable domain and point it to a “null” url such as 192.0.2.1.

So, I did that and the DNS for a-view.org was happy with:

a a-view-hugo.pages.dev to 192.0.2.1

Sort of weird as it’s not my domain to assign. But, ok.

Then I created a route to it thinking it would work because the a record is part of my a-view.org zone.

Got essentially the same error. So, still stuck. Maybe close?