Edge proxy setup
The proxy ships as the npm package @lightning-cmp/edge-proxy. You deploy a thin
Worker that re-exports it.
-
Your domain on Cloudflare. The proxy is a Cloudflare Worker, so the zone must be on Cloudflare.
-
Copy the template. From the package’s
template/directory, set your Workername, theroute, and yourLICENSE_KEY. -
Choose the route scope:
- Scoped —
yourdomain.com/__consent/*— runs only the first-party proxy. - Whole-zone —
yourdomain.com/*— also enables tracker auto-gating and the cookie guard.
- Scoped —
-
Deploy:
wrangler deploy(the template’spnpm deploy). -
Point your embed at the first-party path:
<script src="https://yourdomain.com/__consent/v1/cmp.js?k=YOUR_LICENSE_KEY" async></script>
Verify
Section titled “Verify”curl -s "https://yourdomain.com/__consent/v1/cmp.js?k=YOUR_LICENSE_KEY" | head -1You should see the baked license with "apiBase":"https://yourdomain.com/__consent"
— confirming subsequent SDK calls route back first-party.