Browse the docs

Updates

One origin: site and API on one host

Most small products split into app.example.com and api.example.com, then spend a week on CORS, credentials and SameSite. JobWzrd does the opposite: one server serves the page, the app and the API on jobwzrd.com.

*2026-11-14 · 3 min read*

A session cookie set on api.example.com and read by app.example.com is cross-site. Browsers refuse to attach it without SameSite=None, which then requires Secure, explicit CORS and an origin allow-list that has to be right on every deployment. Each of those is a way to be logged out for reasons nobody can reproduce.

On one hostname the cookie is first-party by construction. There is no CORS preflight, no token in local storage, and no Authorization header to leak, the request carries the cookie because it is the same site.

What it costs

  • One deploy ships the site and the API together, so a rollback rolls both back.
  • The static export has to travel inside the Worker, with its CSP and asset headers

compiled into the bundle.

  • Programmatic clients get their own hostname and per-user API keys, because a CLI

holding a cookie is a worse idea than a scoped key.

The boring architecture is the one where "it logged me out" has one possible cause.

It also made the marketing site measurable: the same origin serves robots.txt, the sitemap and the pages it lists, so a canonical URL is a fact rather than an assumption about DNS.