🔧 GeoComply Integration Architecture
How It Works
Browser → Cloudflare Worker → KV Store (GeoComply-managed) → Browser Geolocation API
/api/license → Reads license key from KV → Returns to browser
/api/sdk → Proxies SDK from GeoComply CDN → Returns latest version
The Key Value Proposition
Zero maintenance for operators. GeoComply pushes both the SDK version and license key directly into your Cloudflare KV store. Your Worker just reads from KV. No manual updates, no version management, no key rotation.
Setup (3 steps)
- Create a Cloudflare KV namespace:
wrangler kv:namespace create SECRETS
- Bind it in
wrangler.toml: [[kv_namespaces]]
binding = "SECRETS"
id = "your-namespace-id"
- GeoComply handles the rest: SDK updates, license rotation, version management
Worker Code Snippets
// /api/license - Read license from KV
export async function onRequest(context) {
const license = await context.env.SECRETS.get('gc_license');
return new Response(license, {
headers: { 'Content-Type': 'text/plain' }
});
}
// /api/sdk - Proxy SDK from GeoComply CDN
export async function onRequest(context) {
const sdkUrl = await context.env.SECRETS.get('gc_sdk_url');
const response = await fetch(sdkUrl);
return new Response(response.body, {
headers: { 'Content-Type': 'application/javascript' }
});
}
Live Status
License Key
Not loaded
SDK URL
Not loaded
Location Result
Not verified