cloudflare · Cloudflare Workers Docs
Workers HTML handling
Configures how Cloudflare Workers static assets handle HTML requests and trailing slashes to manage canonical URLs and SEO.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers HTML handling
Configures how Cloudflare Workers static assets handle HTML requests and trailing slashes to manage canonical URLs and SEO.
When To Use
Use when you need to configure how Cloudflare Workers handles trailing slashes for static assets to prevent SEO duplicate content issues or to enforce specific URL patterns.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-static-assets-routing-html-handling-workflow-guide.md | Documentation regarding the configuration of trailing slashes and HTML handling behavior for Cloudflare Workers static assets. | Questions about documentation regarding the configuration of trailing slashes and HTML handling behavior for Cloudflare Workers stati... |
examples/workers-static-assets-routing-html-handling-cloudflare-workers-static-as.text | A wrangler.toml configuration snippet demonstrating the htmlhandling setting for Cloudflare Workers static assets. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration snippet demonstrating the htmlhandling setting for Cloudflare Workers static assets. |
examples/workers-static-assets-routing-html-handling-cloudflare-workers-static-as-2.text | A toml configuration file demonstrating the htmlhandling setting for Cloudflare Workers static assets. | Exact payloads, commands, or snippets shown in A toml configuration file demonstrating the htmlhandling setting for Cloudflare Workers static assets. |
examples/workers-static-assets-routing-html-handling-cloudflare-workers-static-as-3.text | A configuration snippet for the Cloudflare Workers assets property defining the htmlhandling strategy. | Exact payloads, commands, or snippets shown in A configuration snippet for the Cloudflare Workers assets property defining the htmlhandling strategy. |
examples/workers-static-assets-routing-html-handling-cloudflare-workers-static-as-4.text | A configuration snippet for a toml file demonstrating the htmlhandling setting within the assets table for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A configuration snippet for a toml file demonstrating the htmlhandling setting within the assets table for Cloudflare... |
examples/workers-static-assets-routing-html-handling-cloudflare-workers-static-as-5.text | A configuration snippet for the Cloudflare Workers static assets HTML handling property, specifically demonstrating the drop-trailing-slash option. | Exact payloads, commands, or snippets shown in A configuration snippet for the Cloudflare Workers static assets HTML handling property, specifically demonstrating t... |
examples/workers-static-assets-routing-html-handling-cloudflare-workers-static-as-6.text | A configuration file demonstrating the htmlhandling setting for Cloudflare Workers static assets. | Exact payloads, commands, or snippets shown in A configuration file demonstrating the htmlhandling setting for Cloudflare Workers static assets. |
examples/workers-static-assets-routing-html-handling-cloudflare-workers-static-as-7.text | A wrangler.toml configuration file demonstrating how to set the htmlhandling property for Cloudflare Workers static assets. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to set the htmlhandling property for Cloudflare Workers static a... |
examples/workers-static-assets-routing-html-handling-cloudflare-workers-static-as-8.text | A wrangler.toml configuration file demonstrating how to disable default HTML handling for static assets in a Cloudflare Workers project. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to disable default HTML handling for static assets in a Cloudfla... |
What This Skill Covers
- Forcing or dropping trailing slashes on request paths (for example, example.com/page/ vs. example.com/page) is often something that developers wish to contro...
- Main sections:
Automatic trailing slashes (default),Force trailing slashes,Drop trailing slashes,Disable HTML handling.
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/static-assets/routing/advanced/html-handling
