okhp3-cloudflare-worker-api-proxy

Proxy API calls from static frontends to server-side API keys via Cloudflare Workers.

2|1|Updated Jun 12, 2026
One-click install
npx skills add https://github.com/OKHP3/skillz --skill okhp3-cloudflare-worker-api-proxy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: okhp3-cloudflare-worker-api-proxy
Source: https://github.com/OKHP3/skillz/tree/main/universal/okhp3-cloudflare-worker-api-proxy
Command: npx skills add https://github.com/OKHP3/skillz --skill okhp3-cloudflare-worker-api-proxy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill solves the problem of securely proxying API calls from a static frontend to a keyed API, keeping the API key server-side, and avoiding exposure in the JavaScript bundle.

Core Features & Use Cases

  • API Proxying: Handles API calls server-side, stores API keys securely, and returns results to the browser.
  • Security: The API key is not exposed in the JavaScript bundle, mitigating security risks.
  • Flexibility: Supports any static site and does not require Node.js or local tooling.
  • Use Case: Ideal for client-only apps that need to call an API requiring an API key but cannot expose the key.

Quick Start

Deploy a Cloudflare Worker and use the provided fetch pattern in your client-side code to call the API through the proxy.

Frequently Asked Questions about okhp3-cloudflare-worker-api-proxy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I hide my API key in a static frontend using Cloudflare Workers?

You can hide an API key in a static frontend by deploying a Cloudflare Worker as an API proxy. The Worker stores the API key server-side and securely forwards browser requests, preventing key exposure in your JavaScript bundle.

What is a Cloudflare Worker API proxy and how does it protect API keys?

A Cloudflare Worker API proxy is a server-side function that intercepts client API calls, injects a securely stored API key, and returns the response. This mechanism protects API keys by keeping them entirely out of the client-side JavaScript bundle.

Do I need Node.js to create a Cloudflare Worker API proxy for my static site?

No, you do not need Node.js or local tooling to create this Cloudflare Worker API proxy. It is optimized for static sites and only requires a Cloudflare account to deploy the proxy and manage secret storage.

Can I configure CORS headers when proxying API calls through a Cloudflare Worker?

Yes, you can configure CORS headers when using a Cloudflare Worker API proxy. This allows your static frontend to securely make cross-origin requests to the proxy without exposing the server-side API key.

What is the best way to secure API key protection for client-only applications?

The best way to secure API key protection for client-only applications is routing requests through a server-side API proxy. A Cloudflare Worker handles this by storing keys securely and returning results to the browser without local dependencies.

Why does my API key get exposed in the JavaScript bundle and how do I prevent it?

Your API key gets exposed when client-side JavaScript directly calls a keyed API. You can prevent this exposure by using a Cloudflare Worker API proxy to handle the API calls server-side and manage the key securely.