Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-static-assets-routing-html-handling-workflow-guide.mdDocumentation 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  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/static-assets/routing/advanced/html-handling