okhp3-cloudflare-worker-api-proxy
Create a Cloudflare Worker that proxies API calls from a static frontend to a keyed API, keeping the API key server-side. Use when a client-only app (GitHub Pages, Netlify, Cloudflare Pages) needs to call an API that requires an API key — and exposing that key in the JavaScript bundle is unacceptable. Covers Worker code, CORS headers, secret storage, and the client-side fetch pattern. Verify current Cloudflare pricing, quotas, and product behavior from official documentation before presenting them as guarantees.
Target: Cloud, operations & security. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original English text
Topics in the source
- okhp3-cloudflare-worker-api-proxy
- Scope
- When to use this
- The 30-line Worker
- Setup steps (dashboard, no CLI required)
- Client-side fetch pattern
- Anthropic-specific variant
- Current Cloudflare limits
OverKill Hill P³ · overkillhill.com · github.com/OKHP3 A Cloudflare Worker is a serverless function that runs at Cloudflare's edge. It handles the API call server-side, holds the API key in secrets, and returns | In scope | Out of scope | |---|---| | A narrow static-frontend-to-keyed-API proxy, CORS policy, secret binding, request validation, and client fetch example | Hiding a public endpoint, replacing authentication or authorization, rate-abuse prevention by assumption, or promising current plan limits without verification | the result to your browser. The key never appears in your JavaScript bundle. Use this pattern when: Your static site needs to call an API that requires a key (Anthropic, OpenAI, SendGrid, etc.) Exposing the key in client JavaScript would be a security risk or ToS violation You don't want to set up a full backend server 1. Create the Worker Cloudflare dashboard → Workers & Pages → Create Worker Name it (e.g., my-api-proxy) Paste the Worker code above Edit env.UPSTREAMAPIURL reference and auth header to match your API 2. Add secrets (not visible in code) Worker → Settings → Variables → Add variable Add as Secret (encrypted at rest): APISECRETKEY = your actual
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- OKHP3/skillz
- Source file
- universal/okhp3-cloudflare-worker-api-proxy/SKILL.md
- Fixed revision
- 7b187777d42ab7bc7bab1e5f2c940cd3139ecebf
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: OKHP3/skillz · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-10T10:00:55.827Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.