Workers routes in * domains

I’m requesting the ability to define Workers routes that cover * domains much in the same way they can define route patterns for other zones within the account, e.g.

{ pattern = "**", zone_name = "" }

Say I have a site on Pages that relies on a /api/* workers route (actually, “Pages Function”), and is deployed to a custom domain (say I want that same worker to also serve a custom domain like

I’m sure the answer to this is “not currently possible” because variations of this question have been asked several times before, so this is more of a feature request, pointing out that those existing proposed workarounds are not satisfactory:

  • Using Pages Functions to handle ** (and*) routes, but that “Pages Function” cannot also serve the custom domain route* (it would be a different/duplicated worker script, disparities in deployments, more to maintain, worker global variables not shared)
  • Mapping a Pages preview branch to a custom domain and then using a Workers route on that custom domain. This does not scale for an arbitrary number previews, and the fact remains that ** will not be served by the worker so the domain would still be non-functional without the duplicated Pages Function.