Skip to content

Update workers routes validity #21586

Open
@aaronadamsCA

Description

@aaronadamsCA

Example URL(s)

https://developers.cloudflare.com/workers/configuration/routing/routes/#validity

Actual Behavior

The docs clearly state that a route pattern must include the zone name:

#### Route patterns must include your zone
If your zone is `example.com`, then the simplest possible route pattern you can have is `example.com`, which would match `http://example.com/` and `https://example.com/`, and nothing else. As with a URL, there is an implied path of `/` if you do not specify one.

Expected Behavior

Cloudflare for SaaS has long recommended a "*/*" route pattern:

4. Decide whether you want traffic bound for your SaaS zone (`example.com`) to go to that Worker:
* If *yes*, set the following values:
* **Route**: `*/*` (routes everything — including custom hostnames — to the Worker).
* **Worker**: Select the Worker used for your SaaS application.

This pattern doesn't include the zone name, but it works great! So I'm guessing the workers routes doc is just outdated.

Additional information

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions