Hide API keys behind a Cloudflare Worker
Every client that talks to an API ends up holding a key, and every copy of that key is another place it can leak. The pattern I use to avoid that: hide the key behind a Cloudflare Worker on the free tier. The client calls the Worker. The Worker adds the real key server-side and forwards the request to the upstream API. The client never sees the key, and the Worker URL is the only credential it…
NetBird is a self-hosted WireGuard mesh VPN. The author faced challenges connecting devices outside their house due to NetBird's control plane speaking gRPC and being behind a Cloudflare Tunnel. Attempts to fix the issue included using Cloudflare's gRPC support, which resulted in a 404 error, and changing to a direct connection using a public name and a DDNS script.
The most effective solution was to move the gRPC and relay traffic to a direct connection, while keeping the dashboard and SSO login behind the Cloudflare Tunnel.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to
This story
This is one outlet's version. Read the fullest account.