Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joshka opened this issue Oct 1, 2024 · 0 comments
Open

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

joshka opened this issue Oct 1, 2024 · 0 comments
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product

Comments

@joshka
Copy link

joshka commented Oct 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product
Projects
None yet
Development

No branches or pull requests

8 participants