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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-static-assets-headers-workflow-guide.md | Documentation 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.text | A 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.text | A 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.text | A 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.text | A 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.text | An 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.text | An 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.text | A 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.text | A 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
- 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/headers
