Skip to content
Fermium

Two origins

Why user content lives on fermiumusercontent.app and the app lives on fermium.app.

Fermium hosts content other people wrote, some of it made by AI tools, some of it meant only for one company. The design assumes every document is hostile and every link will be forwarded. The first line of defense is the browser's own same-origin policy.

The split

Host Serves Never serves
fermium.app the web app, /api, /auth, /oauth, /mcp, the marketing site user content
fermiumusercontent.app and your custom domains /d/<slug>/..., the /x/ link resolver, the /w/ wiki, /icons/ for uploaded SVG icons, /robots.txt, health probes and three shared scripts; on a custom domain, an app's page at a path bound to it the Fermium web app, the API, sign-in
<name>.fermium.bot one app: its page, its forms (/forms/<name>/ and the requests a form makes), calls to its functions (/api/<route>, /runs/<id>), its incoming webhooks (/hooks/<secret>), a redirect into Fermium (/edit), the requests its page makes (/d/<slug>/_app/...), /robots.txt and the shared assets every other document, the wiki, the Fermium web app, Fermium's API, sign-in, and every other app

A request for /d/, /x/ or /w/ on the app host is redirected to the content host. A request for anything outside that list on the content host is a 404 (on a custom domain a path bound to an app serves that app, and the bare root otherwise redirects to the wiki). This is enforced at the outermost layer of the server, before any route runs.

Everything on the content surface follows the same rule about user content: /x/ only redirects to /d/. The wiki's pages are neutral pages Fermium renders, and an HTML document shown inside the wiki is loaded in a sandboxed frame from its own /d/ address rather than inlined. Uploaded icons are validated on upload and served with the same sandbox policy as any published file.

Why a separate registrable domain

If a published page ran on the same origin as the app, its JavaScript could read the app's cookies and call the API as whoever is viewing. A sandbox header alone would prevent that, but a header can be missed. The hostname split makes the model hold even then.

A separate registrable domain, rather than a subdomain of fermium.app, matters for three more reasons:

  • Reputation systems (Safe Browsing, mail filters, corporate proxies) score a registrable domain as one site. Abuse on the content domain does not taint the app, sign-in emails or the marketing site. GitHub, Google and Anthropic use the same pattern with githubusercontent.com, googleusercontent.com and claudeusercontent.com.
  • Cookies and browser site isolation are scoped per registrable domain. SameSite, Domain= cookies and storage partitioning treat fermium.app and fermiumusercontent.app as unrelated sites.
  • A phishing page under a hostname that ends in the product's own domain is more convincing than one under a generic content domain.

Cookies never cross

The app session cookie is host-only on fermium.app, HttpOnly, Secure, SameSite=Lax, and prefixed __Host- so a browser refuses to accept it from anywhere else. The content host has its own short-lived viewer cookie with the same properties. When a Restricted document needs proof that the reader signed in, the app host issues a one-time code that expires in 60 seconds. The content host redeems it and sets its own cookie. No cookie is ever readable from both sides. Details in Sign-in.

Custom domains behave like the content host

A verified customer hostname is treated exactly as fermiumusercontent.app, restricted further to that one workspace's documents. It never serves the app or sign-in, so your company's cookies on yourcompany.com are not exposed to published pages either, provided you use a subdomain rather than the apex. The server enforces that.

A document shown inside Fermium

Inside the app a document is shown in a sandboxed frame from the content host, at an address that carries a ticket for that one document and that one person. The ticket lasts ten minutes, and every request under it checks that person's access again, so the frame is given a new address while you read.

A frame at a new address loads again, and the app cannot see into a sandboxed frame to put you back where you were. So the content host adds a few lines of Fermium's own script to an HTML page it serves into that frame, after the page's own content. They tell the app how far down you have scrolled and which page of the document is open, and they scroll to a position the app gives back. A number and a path cross the frame, and nothing else. The stored document is not changed, and a page opened at its own link is served without these lines.

A page that keeps up with its document

A page that is open shows a newer version of its document by itself. The page is sandboxed, so this is done the way a form and an app's page do their work: with a ticket, on routes that read no cookie.

  • One script, added when the page is served. The content host adds a script tag after the page's own content. The script is one of the host's shared files, the same for every page. The stored document is not changed.
  • A ticket that can only return what a reload would. Where a document asks who is reading (Restricted, or a password), the page carries a signed ticket that names that document and that reader, valid for 12 hours. Each use judges that reader again: can they still open the document, from a network the workspace approved, with the link's password still the one the page was opened with. A document open to anyone with its link carries no ticket, because the link is what lets a reader in; its page stays the same for everybody.
  • Two routes, under the document's own address. /d/<slug>/_live/state answers a version number and whether more is likely soon, and nothing about who wrote it. /d/<slug>/_live/page answers the rendered page of the current version. They read no cookie and answer any origin; without a ticket they answer 401, except for a document open to anyone.
  • A page with its author's script gets a number, never content. A script an author put in a page can read that page's ticket. So the route that returns a page answers only for a page Fermium rendered with none of the author's HTML in it: a snippet, or a Markdown document without raw HTML. Every other page learns that a newer version exists and reloads through the document's ordinary address, with the ordinary checks.
  • Nothing is stored in the browser. A sandboxed page has no storage. When a page reloads for a newer version it carries the reader's scroll position across in the window's name, and puts the name back as it was.
  • A page is told when only the files beside it changed. A page that reloads names the stored file it is by the first 16 characters of that file's hash. The state route answers whether a file with that hash is still in the document, and says nothing about any other file. A page that draws its own data listens for fermium:update and takes the change in without loading again.
  • Inside a frame, a number crosses it. A page shown in a frame tells the page around it which version it shows, the newest version it knows of, and whether it is holding one back. The file viewer uses that for its notice and for the version a comment belongs to. The page around a frame can ask the page to wait, or to look for a newer version now. Either can be asked by any page that frames a document: one pauses the page, the other asks the server a little sooner, at most once a second.
  • A page can refuse. <meta name="fermium-live" content="off"> in a page's head switches all of this off for that page.

A page reads the files beside it

A document's page is sandboxed and has no origin. To a browser, a request the page makes for data.json beside it therefore comes from another origin, and fetch("data.json") fails unless the file says it may be read. So the content host answers a document's files with Access-Control-Allow-Origin: *.

That opens nothing that was closed:

  • A request another page makes carries no cookie of the reader's on this host. A browser treats the requests of a sandboxed page as coming from another site, and the viewer cookie is SameSite=Lax. So the request is answered as the bare address would be: a document open to anyone with its link answers, and a document that asks who is reading answers with its sign-in.
  • A browser never hands a response marked * to a request that did carry credentials, and the content host never sends Access-Control-Allow-Credentials.
  • Only a plain GET works. There is no answer to a preflight, so a request with headers of its own is refused by the browser.

Inside Fermium the frame's address carries the ticket, so a page there reads the files beside it too.

An app at its own address

The link of a published app serves its page with nothing of Fermium around it. That page can read and add rows and start functions, so it is worth saying exactly what runs where.

  • What is served is a page of Fermium's, sandboxed like every document. It is sent with sandbox allow-scripts and no allow-same-origin, so it has no origin, no cookies and no storage, and with a policy that lets it contact one address only: the app's own link. It cannot be framed by another page.

  • The app's code runs one level further in. The page holds the app's own page in a second sandboxed frame, the same frame Preview uses inside Fermium. That frame is allowed no network at all. It asks the page around it for five things (list tables, read rows, add a row, call a function, read a call's result), and nothing else is passed on.

  • A ticket, not a cookie, authorizes those requests. The page is served only after the content host's sign-in hand-off let one person in. It carries a signed ticket that names that person's profile and that one app, valid for 12 hours. Each request sends the ticket in a header and is judged again as that profile: is the ticket still good, can they still open the app, are they on a network the workspace approved. Signing out everywhere, being removed, or losing access to the app stops an open page at its next request.

  • Why not the cookie. A document on the content host is hostile by assumption. It is sandboxed, so it cannot read other pages, but it can make the reader's browser send a request with the reader's cookie attached. If the cookie authorized an app's requests, any document a person opened could add rows to their apps. The routes under /d/<slug>/_app/ read no cookie, and a document cannot read the page that holds a ticket, so it has nothing to send that they accept.

  • Those routes answer any origin. A page without an origin can only read answers that are open to every origin, so they carry Access-Control-Allow-Origin: *. That exposes nothing by itself: without a ticket every one of them answers 401.

  • A visitor gets a ticket that names nobody. An app's page follows the access of the app's document, like every page here. When that is anyone with the link, or a password, a reader without a sign-in is served the same sandboxed page, after the password where there is one, with a ticket that says only "a visitor, for this app, on this page load, who gave this password". No cookie is set. Each request is judged again: does the link still let visitors in, is its password still the one this page was opened with, can the member who opened it still edit the app, is this table or this function one that was opened. A visitor's request is made with that member's access and held to the list the owner ticked; a table or function outside it answers 403, and the list is read on every request, so unticking something stops an open page at its next request. A run a visitor started is shown to them without its logs or the text of its error. Requests from one address are counted per minute, and a visitor's retry key is tied to their own page load, so no visitor is ever answered with what another one did. Nothing under /api/ accepts such a ticket: the product's own screens and API are never public.

  • A function called at the app's own address takes a token, never a cookie. POST <root>/api/<route> is for callers outside the page. A member names themselves with a personal token in the Authorization header and gets what that member may do. Where the app's link lets in visitors, a function ticked for them answers without a token (with the link's password, where it has one). The Fermium session cookie does not exist on this domain, and the viewer cookie that does is not read here.

  • A form under the app's root is the form's own page, at a name a person gave it. /forms/<name>/ serves the form's document in its usual sandbox with its usual ticket, behind the form's own access. No form is named automatically: a form open to anyone with its link is protected by that link being unguessable, and a name is not. Naming such a form takes the right to change who can open it. Only forms that were named are reachable on the app's hostname, by that name or by their own link; a form nobody named answers 404 there, as a name no form has does. As with an alias, a name tells whoever asks which document it leads to (the sign-in hand-off and the password prompt carry the form's link), so a form that has had a short address should not be counted on to be secret by its link alone. In the same way /edit shows the app's id in its redirect, and gives nothing without a sign-in the app is shared with.

On a custom domain the same page is served at a path the workspace bound to the app, under the same rules, and only for apps of the workspace that verified the domain.

A third domain for apps. Each app also has a hostname of its own under fermium.bot, a registrable domain apart from both fermium.app and fermiumusercontent.app. One hostname is one app: the same sandboxed page, the same ticket, and nothing else answers there. Sign-in returns a person to an app's hostname only when it is the hostname of the app they asked for. A name under fermium.bot is given out by Fermium alone: it cannot be verified as a custom domain or bound by hand. Responses there carry Strict-Transport-Security.

Requests that change state

State-changing calls to /api/..., /auth/... and the OAuth authorize endpoint are rejected when the request's Origin header is present and is not https://fermium.app. Together with SameSite=Lax this blocks cross-site request forgery. The credential-less OAuth endpoints (metadata, register, token, revoke) are intentionally open to any origin so browser-based MCP clients can drive the flow.

Search engines

Every page on the shared content host is served with noindex, nofollow, as a header and as a meta tag, and its /robots.txt disallows everything. That does not change. The one exception is opt-in: a workspace on a paid plan can mark its wiki indexable on an active custom domain. Even then only wiki pages of unlisted documents a person placed in the wiki become indexable, on that domain, with a sitemap. /d/ and /x/ stay disallowed and gated documents never carry indexing metadata.

What this does not do

The split does not make a document private. An unlisted link is readable by anyone who has it. Keep anything that must not travel Restricted, or protect it with a password. See Access.