1. Campaign landing
?c=<code> and legacy /l/<slug>: resolve, stamp stage_ref, 302 to the clean URL. Detail in Campaign landing.
2. Private site gate
When an org is private, every request needs astage_access cookie.
- The cookie is a short-lived signed token (ES256) minted by the API for members and set on the site domain by the admin after sign-in. Seven days, cleared on sign-out.
- The middleware polls a public, CDN-cached endpoint for the org’s mode and the public verification key. A flip propagates in about a minute with no redeploy, and the deployment holds no signing material.
- Blocked requests redirect to
/admin?from=<path>. After sign-in the admin sets the cookie and sends the visitor back. - Presentation assets (CSS, scripts, fonts, images) are exempt so the admin can draw itself. Content-bearing files (HTML, sitemaps, text, JSON) are gated.
- Fail-open only when blind. An unreachable API holds the last cached verdict; with no cache at all the site serves. An outage must not take every site down.