CORS proxy

A browser won't let a page read a feed from another site unless that site allows it. In May 2023 I wrote a 42-line Cloudflare Worker to get around that for my own news readers. In 2026 I found I'd published an open relay, and rewrote it to be safe by default.

Code on GitHub

Made
, rewritten
Built with
Cloudflare Workers, JavaScript, no dependencies
Status
Open source, MIT

The question

Could a few static pages read RSS feeds, news APIs and article pages straight from the browser, with no server of my own? Most feeds don't send CORS headers, so the browser throws the response away even though the request succeeded. A proxy that fetches the URL and adds the missing header fixes that. The question was how small one could be.

How it works

A page asks the Worker for ?url= followed by the address it wants. The Worker fetches it and sends the body back with Access-Control-Allow-Origin set to that page's site. The 2026 version is still one file with no dependencies, and it refuses more than it serves:

Evidence

What didn't work