Back to docs
Recipe

Edge Workers

Deploy Nimbus validation at the edge. Run license checks in milliseconds from 300+ locations worldwide — no cold starts, no origin round-trips.

1

Deploy the Worker

Push a single file to Cloudflare Workers or Vercel Edge. The runtime boots in under 5ms and validates Ed25519 license tokens without touching your origin.

2

Verify at the Edge

Each request carries a signed license blob. The worker checks the Ed25519 signature, expiry, and hardware binding before forwarding to your API — invalid requests never reach your servers.

3

Cache & Enforce

Validated sessions are cached at the edge with configurable TTL. Revoked keys propagate globally in under 60 seconds via KV-backed denylists.

Quick Start

import { verify } from '@getnimbus/edge';

export default {
async fetch(request) {
const result = await verify(request);
if (!result.valid) return new Response('Unauthorized', { status: 401 });
return fetch(request);
}
};

Pro tip: Combine edge validation with rate limiting for a complete zero-trust API gateway that blocks unlicensed traffic before it reaches your infrastructure.