Credentials. The hosted Worker receives raw requests and provider credentials, so you must trust the hosting environment and add your own access control.
Who it is forA team lead or DevOps engineer who needs a shared, hosted redaction layer for several developers and has a Cloudflare account.
The problemEach developer running a local gateway is hard to manage, and an unconfigured hosted gateway could forward requests to any destination.
The outcomeA Cloudflare Worker running the gateway, with an upstream allowlist set as a Worker variable and tests passing before deployment.
What you need first
- Node.js 20+, Git, and a terminal
- An OpenAI or Anthropic API key and an available model name, only if you make live upstream calls
- A trusted environment for running the gateway, since it handles raw requests and provider credentials
Steps
- Run the test suite from the repo folder with
npm test - Deploy the Worker with
npx wrangler deploy - Set the Worker variable
REDACT_ALLOWED_HOSTS=api.openai.com,api.anthropic.comin the Cloudflare dashboard - Add access control in front of the Worker before sharing its URL, as the README advises for public exposure (inferred, check the README)
Prompt for your agent
In the CosyRedactGateway repo, run `npm test` and then `npx wrangler deploy` for the account in <your-cloudflare-account>. Confirm the deployed Worker rejects a request to a host not in REDACT_ALLOWED_HOSTS and state that host allowlisting does not authenticate callers.
Caveat. The README says the allowlist limits target hosts but does not authenticate callers, so the Worker must have outside access control before any public traffic.
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page