← Back to home

CLOUDFLARE DEPLOYMENT

Make the gate real.

Static HTML cannot securely verify payment. Do not trust a query string, local storage value, hidden HTML, or client-side JavaScript flag.
  1. Verify provider webhooks using the provider’s official signature verification and a Worker secret.
  2. Store only the minimum entitlement record in KV or D1.
  3. After an authenticated user session, issue a short-lived signed access token.
  4. Verify the token with Web Crypto before returning protected HTML.
  5. Keep provider secrets, webhook signing secrets, and HMAC keys out of GitHub and browser code.
  6. Return an HTML response or HTML redirect for every user-facing failure.

A non-production Worker contract sketch is included at worker/gate.js. It deliberately returns no access until reviewed provider verification and token logic are implemented.

← Return to support options