Hacker News new | ask | show | jobs
by mousetree 1166 days ago
Could be as simple and cost-efficient as a Cloudflare worker that adds your key and passes the query along
3 comments

Or a 5€/mo Hetzner server running Nginx, though Cloudflares free offering is very generous
You have to use Cloudflare Workers in Unbounded mode to do this (especially if you are streaming using EventSource or WebSockets). Bundled mode won't cut it as it closes connection after 50ms of Javascript execution.
That’s 50ms of CPU execution, which does not include waiting for IO.
You'd need some kind of authentication as well.
Errrr, I assume your app can pass said authentication? If so, then it's meaningless; that's again a secret not under your control.