002 The web app on its own host
Summary: why the recommended deployment serves the web app from a static host other than the API server.
Key terms: web origin, API origin, discovery, CSP, web bundle.
Related: Operation · Concepts
Date: 2026-11-23. State: in force (spec §4.3).
Decided
- The web app is a generic static bundle. A deployment adds
config.json, the discovery document and the CSPconnect-srcvalue, and serves it from the web origin. - The API server publishes the public listener at a separate API origin. The server can also serve the bundle itself
(
serve_web_bundle), as a self-hosting option. - The bundle has no inline scripts and no third-party code, and every release publishes it with its SHA-256.
Why
Every person opens the web app: to sign up, and to approve each new device. Whoever can change its files can steal the keys of people who use it during that time. With a separate host:
- Root on the API host cannot change the code that runs in browsers.
- The API host stays a store with no influence over key handling.
Refused
| Refused | Reason |
|---|---|
| Server-side rendering of the web app | The server would produce the code that handles keys |
| Third-party scripts, fonts or analytics | Each is code that runs with the keys in reach |