cloudflare · Cloudflare Workers Docs
Workers CORS header proxy
Implements a Cloudflare Worker that acts as a proxy to append Cross-Origin Resource Sharing (CORS) headers to responses from third-party APIs.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers CORS header proxy
Implements a Cloudflare Worker that acts as a proxy to append Cross-Origin Resource Sharing (CORS) headers to responses from third-party APIs.
When To Use
Use when you need to bypass CORS restrictions by routing client-side requests through a Cloudflare Worker to inject required security headers into third-party API responses.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-examples-cors-header-proxy-workflow-guide.md | A Cloudflare Workers example demonstrating how to add CORS headers to a third-party API response. | Questions about a Cloudflare Workers example demonstrating how to add CORS headers to a third-party API response. |
examples/workers-examples-cors-header-proxy-cloudflare-workers-cors-header-proxy.text | A Cloudflare Workers script that intercepts requests to add CORS headers for a remote API. | Exact payloads, commands, or snippets shown in A Cloudflare Workers script that intercepts requests to add CORS headers for a remote API. |
examples/workers-examples-cors-header-proxy-cloudflare-workers-cors-header-proxy-2.text | A Cloudflare Workers script that intercepts requests to add CORS headers for a remote third-party API. | Exact payloads, commands, or snippets shown in A Cloudflare Workers script that intercepts requests to add CORS headers for a remote third-party API. |
examples/workers-examples-cors-header-proxy-cloudflare-workers-hono-cors-header-p.text | A Hono-based Cloudflare Worker implementation that acts as a reverse proxy to add CORS headers to remote API requests. | Exact payloads, commands, or snippets shown in A Hono-based Cloudflare Worker implementation that acts as a reverse proxy to add CORS headers to remote API requests. |
examples/workers-examples-cors-header-proxy-cloudflare-workers-python-cors-header.text | A Python implementation of a Cloudflare Worker that intercepts requests to inject CORS headers into responses. | Exact payloads, commands, or snippets shown in A Python implementation of a Cloudflare Worker that intercepts requests to inject CORS headers into responses. |
examples/workers-examples-cors-header-proxy-cloudflare-workers-rust-cors-header-p.text | A Rust implementation of a Cloudflare Worker that acts as a proxy to inject CORS headers into responses. | Exact payloads, commands, or snippets shown in A Rust implementation of a Cloudflare Worker that acts as a proxy to inject CORS headers into responses. |
What This Skill Covers
- Add the necessary CORS headers to a third party API response.
- Main sections:
Tags.
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/examples/cors-header-proxy
