Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Headers

Configures default and custom HTTP response headers for Workers static assets by creating and placing a headers file within the project directory.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Headers

Configures default and custom HTTP response headers for Workers static assets by creating and placing a headers file within the project directory.

When To Use

Use when you need to override default Cache-Control settings, add custom security headers, or manage Content-Type behavior for static assets served via Cloudflare Workers.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-static-assets-headers-workflow-guide.mdDocumentation explaining how Cloudflare Workers handles default and custom HTTP headers when serving static assets.Questions about documentation explaining how Cloudflare Workers handles default and custom HTTP headers when serving static assets.
examples/workers-static-assets-headers-cloudflare-workers-static-assets-headers.textA plain text list of HTTP header names and values used for configuring static assets in Cloudflare Workers.Exact payloads, commands, or snippets shown in A plain text list of HTTP header names and values used for configuring static assets in Cloudflare Workers.
examples/workers-static-assets-headers-cloudflare-workers-static-assets-headers-2.textA text-based demonstration of various HTTP security and robot headers applied to different static asset paths in a Cloudflare Worker.Exact payloads, commands, or snippets shown in A text-based demonstration of various HTTP security and robot headers applied to different static asset paths in a Cl...
examples/workers-static-assets-headers-cloudflare-workers-static-assets-headers-s.textA text file demonstrating Content-Security-Policy header configurations for Cloudflare Workers static assets.Exact payloads, commands, or snippets shown in A text file demonstrating Content-Security-Policy header configurations for Cloudflare Workers static assets.
examples/workers-static-assets-headers-cloudflare-workers-static-assets-headers-r.textA text representation of how to map specific URL routes to custom HTTP headers using Cloudflare Workers static assets configuration.Exact payloads, commands, or snippets shown in A text representation of how to map specific URL routes to custom HTTP headers using Cloudflare Workers static assets...
examples/workers-static-assets-headers-cloudflare-workers-static-assets-headers-3.textAn example configuration demonstrating how to define custom HTTP headers for static assets within Cloudflare Workers.Exact payloads, commands, or snippets shown in An example configuration demonstrating how to define custom HTTP headers for static assets within Cloudflare Workers.
examples/workers-static-assets-headers-cloudflare-workers-static-assets-headers-4.textAn example configuration demonstrating how to apply custom HTTP headers to static assets in Cloudflare Workers.Exact payloads, commands, or snippets shown in An example configuration demonstrating how to apply custom HTTP headers to static assets in Cloudflare Workers.
examples/workers-static-assets-headers-cloudflare-workers-static-assets-headers-c.textA configuration example showing how to apply Cache-Control headers to static assets using the Workers static assets pattern.Exact payloads, commands, or snippets shown in A configuration example showing how to apply Cache-Control headers to static assets using the Workers static assets p...
examples/workers-static-assets-headers-cloudflare-workers-static-assets-headers-c-2.textA text configuration showing how to apply security headers to specific routes within Cloudflare Workers static assets.Exact payloads, commands, or snippets shown in A text configuration showing how to apply security headers to specific routes within Cloudflare Workers static assets.

What This Skill Covers

  • When serving static assets, Workers will attach some headers to the response by default. These are:
  • Main sections: Default headers, Custom headers, Attach a header, Detach a header, Match a path.

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/headers