Cloudflare CORS proxy in a worker.
CLOUDFLARE-CORS-ANYWHERE
Source: https://github.com/ZHider/cloudflare-cors-anywhere-2026
This project is written in Cloudfalre Workers, and can be easily deployed with Wrangler CLI.
# Command could be various due to your package manager
# Here is pnpm for example
# install wrangler to deploy
pnpm install -D wrangler
pnpm exec wrangler deployfetch("https://test.cors.workers.dev/?https://httpbin.org/post", {
method: "post",
headers: {
"x-foo": "bar",
"x-bar": "foo",
"x-cors-headers": JSON.stringify({
// allows to send forbidden headers
// https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name
cookies: "x=123",
}),
},
})
.then((res) => {
// allows to read all headers (even forbidden headers like set-cookies)
const headers = JSON.parse(res.headers.get("cors-received-headers"));
console.log(headers);
return res.json();
})
.then(console.log);All received headers are also returned in "cors-received-headers" header.
To create your own is very easy, you just need to set up a cloudflare account and deploy the worker code.
THANKS to Zibri, the source of idea and the original code! Though I basically rewrite all over it for my own convenience since I found it could not be deployed directly to Cloudflare worker in 2026.