Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-examples-cors-header-proxy-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  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/examples/cors-header-proxy