Skip to content

Workers routes docs incorrectly suggest that scheme can be passed #17263

@joshka

Description

@joshka

Existing documentation URL(s)

https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior

Route patterns look like this:

https://.example.com/images/

This pattern would match all HTTPS requests destined for a subhost of example.com and whose paths are prefixed by /images/.

And https://developers.cloudflare.com/workers/configuration/routing/routes/#route-patterns-may-optionally-begin-with-http-or-https

Route patterns may optionally begin with http:// or https://

If you omit a scheme in your route pattern, it will match both http:// and https:// URLs. If you include http:// or https://, it will only match HTTP or HTTPS requests, respectively.

https://*.example.com/ matches https://www.example.com/ but not http://www.example.com/.

*.example.com/ matches both https://www.example.com/ and http://www.example.com/.

However when using a route that includes https:// or http:// this results in a faulty configuration. Confirm this in the website:

image

What changes are you suggesting?

Fix the docs by removing the inaccurate text, or fix the feature (I'm not sure whether the docs are incorrect or the feature is buggy).

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