Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-configuration-routing-routes-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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