How the admin area is guarded, where every key lives, what is written down when anyone changes something, and how to see what is switched on.
The admin area answers at admin.amapas353.com; /admin on the site’s
other addresses sends you there.
/api/admin call, against the team and the application’s audience tag
(CF_ACCESS_AUD). A request that reached the Worker some other way — the
preview address, say — is refused or sent to the admin address, so turning
Access off in the dashboard would not open admin to the world.Staging (staging.amapas353.com, decision 0064) has its own Access application, over the whole address:
the public pages too, not only admin. Its Worker checks the signed token on every request. Until that
application’s audience tag is in its configuration, staging shows nothing at all, only “not set up yet”.
Its admin can copy content from the live site but cannot publish; Publish lives on the live admin and
needs the GITHUB_PUBLISH_TOKEN key there.
ADMIN_PREVIEW_TOKEN, the shared password admin used before Access, is still
set, by the owners’ choice — but it does nothing while Access is on: the
Worker reads it only when CF_ACCESS_AUD is absent. It is the way back in if
Access ever has to be switched off (RUNBOOK §3b, step 7).
Every key is a secret on the Worker (the Worker’s Settings → Variables and Secrets) and nowhere else. The page The stack at a glance lists them by name. None is in the repository, none in these guides, and a session working on the code never holds one: it reads the live state through a read-only Cloudflare token and the site’s own health report.
/api/health — on any of the site’s addresses — answers with the build that
is running and a line for each service: the database and photo store, whether
Lodgify answered, Stripe (and whether it is in test or live mode), Resend,
Turnstile, the screening keys, the ChatGPT pick-up, DMARC and how admin is
guarded. It holds no secrets; it is the first thing to read when something
looks wrong. The admin Overview screen shows the same facts in words, and the
Launch Book’s strip at the top reads them live.
Every link that opens a guest’s own page — a payment link, a finish-booking
link, a booking’s page — carries a token signed with LINK_SIGNING_SECRET and
an expiry. The Worker checks both before it shows anything. The Google tag on
the public pages is given the page’s address with that token removed.