cloudflare · Cloudflare Workers Docs
Workers Routes
Teaches how to map URL patterns to Cloudflare Workers using the dashboard or Wrangler configuration files, including rules for matching behavior and pattern validity.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Routes
Teaches how to map URL patterns to Cloudflare Workers using the dashboard or Wrangler configuration files, including rules for matching behavior and pattern validity.
When To Use
Use when you need to map specific URL patterns to a Worker to intercept requests or act as a proxy in front of an existing application server.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-configuration-routing-routes-workflow-guide.md | A guide explaining how to map URL patterns to Workers using the dashboard or Wrangler configuration. | Questions about a guide explaining how to map URL patterns to Workers using the dashboard or Wrangler configuration. |
examples/workers-configuration-routing-routes-cloudflare-workers-routes-configura.text | A text example demonstrating the JSON structure for configuring Workers routes using patterns and zone identifiers. | Exact payloads, commands, or snippets shown in A text example demonstrating the JSON structure for configuring Workers routes using patterns and zone identifiers. |
examples/workers-configuration-routing-routes-cloudflare-workers-routes-configura-2.text | A TOML configuration snippet demonstrating the syntax for defining worker routes using pattern and zone properties. | Exact payloads, commands, or snippets shown in A TOML configuration snippet demonstrating the syntax for defining worker routes using pattern and zone properties. |
examples/workers-configuration-routing-routes-cloudflare-workers-routes-configura-3.text | A JSON configuration object defining route patterns and associated zone names for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A JSON configuration object defining route patterns and associated zone names for Cloudflare Workers. |
examples/workers-configuration-routing-routes-cloudflare-workers-routes-toml-conf.text | A TOML configuration snippet demonstrating how to define worker route patterns and zone names. | Exact payloads, commands, or snippets shown in A TOML configuration snippet demonstrating how to define worker route patterns and zone names. |
examples/workers-configuration-routing-routes-cloudflare-workers-routes-pattern-e.text | A list of text-based pattern examples for configuring Cloudflare Workers routes using wildcards. | Exact payloads, commands, or snippets shown in A list of text-based pattern examples for configuring Cloudflare Workers routes using wildcards. |
examples/workers-configuration-routing-routes-cloudflare-workers-routes-pattern-e-2.text | A list of text-based pattern examples for configuring Cloudflare Workers routes using wildcards. | Exact payloads, commands, or snippets shown in A list of text-based pattern examples for configuring Cloudflare Workers routes using wildcards. |
examples/workers-configuration-routing-routes-cloudflare-workers-routes-pattern-m.text | A list of URL pattern examples demonstrating how Cloudflare Workers routes match specific paths and exclude others. | Exact payloads, commands, or snippets shown in A list of URL pattern examples demonstrating how Cloudflare Workers routes match specific paths and exclude others. |
What This Skill Covers
- Routes allow users to map a URL pattern to a Worker. When a request comes in to the Cloudflare network that matches the specified URL pattern, your Worker wi...
- Main sections:
Background,Set up a route,Set up a route in the dashboard,Set up a route in the Wrangler configuration file,Matching behavior.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/configuration/routing/routes
