Wildcard for a domain in Workers routes

For Workes & Pages, what is the name of the domain?

relayto <dot> com

What is the error number?

10022

What is the error message?

Route pattern must include zone name: relayto com

What is the issue or error you’re encountering

We have a Worker with the wildcard for the hostname in the routes in wrangler.toml to enable worker on clients’ custom domains. It stopped working.

What are the steps to reproduce the issue?

We have a Worker with the wildcard for the hostname in the routes in wrangler.toml:

routes = [ 
    { pattern="*/*", zone_id="xxxxxx" }
]

The reason we have this setup is that we wanted the worker to trigger for our clients’ custom domains dynamically connected via Cloudflare for SaaS.
e.g.

example.org -> our domain
client1.org CNAME cname.example.org -> client1 domain connected to ours
client2.org CNAME cname.example.org -> client2 domain connected to ours

The worker used to trigger for requests to example.org, client1.org & client2.org. Recently, when publishing the Worker, we started to experience the error :

Route pattern must include zone name: relayto <dot> com [code: 10022]

It looks like something has changed recently. What is the recommended Wrangler routes setup for the worker to trigger for every dynamically connected custom domain?