Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Creates a Cloudflare Worker that proxies a static frontend's keyed API calls server-side, keeping the API key in secrets.
48% 65%+17 ptsof test cases passed
Passed 15 of 23 test cases with the skill, and 11 of 23 without it.
3 of 3 safety checks passed
Not used yet
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:
// worker.js — paste this into the Cloudflare Worker editor
export default {
async fetch(request, env) {
// Handle CORS preflight
if (request.method === 'OPTIONS') {
return new Response(null, {
headers: {
'Access-Control-Allow-Origin': env.ALLOWED_ORIGIN || '*',
'Access-Control-Allow-Methods': 'POST, GET, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type',
'Access-Control-Max-Age': '86400',
},
});
}
Next to this one in the catalogue, plus more from the same author.