Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sterish.xyz has been attached to the dashboard's Vercel project since STE-26, but nothing routed the apex host anywhere: both hosts returned byte-identical HTML for "/", so the brand URL printed in the report, the video script and the X bio served the registry dashboard instead of the landing page from STE-23. One host-based rewrite fixes it. On sterish.xyz and www.sterish.xyz, "/" renders /landing; on app.sterish.xyz, preview URLs and localhost it stays the dashboard. /landing keeps answering everywhere, because links already shared point at it, and every other route resolves identically on every host. Two things this cost an iteration to learn, both now written down next to the code: - The rule must sit in `beforeFiles`. The plain array form becomes `afterFiles`, which Next only consults once nothing else matched, and "/" is a real route — so the first version built cleanly, appeared in the routes manifest, and did nothing. - Next matches `has: host` against `^value$` on the lowercased hostname with the port stripped, so the dots are escaped: unescaped, `sterishaxyz` would match. The host list is a module with unit tests rather than a literal in next.config, because rewrites are compiled into the routes manifest at build time: a mistake there is invisible until it is deployed. `LANDING_HOSTS` overrides it at build time, which is also how this was verified. Verified against a production build with the production defaults, by Host header: sterish.xyz, www.sterish.xyz and STERISH.XYZ render the landing page at "/"; app.sterish.xyz, localhost, not-sterish.xyz and sterish.xyz.attacker.example render the dashboard; /landing, /check, /activity, /brand, /licences, /licences/{address} and /skills/{id} are unchanged on every host, and an unknown path still 404s. 10 new tests, 186 green in frontend. typecheck, lint and build green.
docs/deployments.md claimed sterish.xyz was a 404 reserved for the landing page. It has not been a 404 since STE-26; until this ticket it served the dashboard. The table now records what each hostname actually returns, checked today, and adds the direct /landing URL that shared links and the Instawards report use. The frontend README gains the host table and the LANDING_HOSTS recipe for seeing the landing page at "/" on a local build, since rewrites are baked in at build time and `pnpm dev` alone will not show it.
997200a to
73ff613
Compare
A repository ruleset appeared on the default branch today at 19:20 (+07): no direct push, PR required, and `required_signatures`. `bypass_actors` is empty and `current_user_can_bypass` is "never", so `gh pr merge --admin` does not help either — unsigned commits simply cannot reach main. Writes down what this worktree is now configured with (SSH signing with the existing key), the one step that config cannot do for itself — registering the same public key as a Signing Key on the GitHub account, which is why GitHub still answers `reason: "unknown_key"` — and the command to tell the two failure modes apart.
|
Blocked on one account setting, not on the code. A repository ruleset named The commits on this branch are now SSH-signed, but GitHub answers:
The last commit writes the whole thing down in CI is green: |
|
Closing this in favour of #66. @Nabil-Aufa had already done it, five minutes earlier and one layer deeper: this PR routed a host, his splits the landing into its own deployable app. His version is the better one, and not only because it came first:
One consequence of #66 worth stating out loud, because it is not in its description: it deletes Kept out of the bin: the Branch |
sterish.xyzhas been attached to the dashboard's Vercel project since STE-26, but nothing routed the apex host anywhere. Checked this morning, both hosts returned byte-identical HTML for/(146,999 bytes,<title>Registry · Sterish</title>), so the brand URL printed in the Instawards report, the video script and the X bio served the registry dashboard instead of the landing page from STE-23.What changed
One host-based rewrite,
/→/landing, forsterish.xyzandwww.sterish.xyz. Everything else is untouched:/renderssterish.xyz,www.sterish.xyzapp.sterish.xyzlocalhost/landingkeeps answering on every host, because shared links and the report point at it, and every other route resolves identically on every host.No second repo and no second Vercel project: the landing is 13 lines of page plus one module, and it shares the design tokens and
/brandpage from STE-7 and the API config with the dashboard. Splitting it would duplicate both for no gain at this stage.Two things that cost an iteration, both written down next to the code
beforeFiles. The plain array form becomesafterFiles, which Next only consults once nothing else matched — and/is a real route. The first version built cleanly, appeared in the routes manifest, and did nothing.has: hostagainst^value$on the lowercased hostname with the port stripped, so the dots are escaped. Unescaped,sterishaxyzwould matchsterish.xyz.The host list is a tested module (
frontend/src/lib/landingHosts.ts) rather than a literal innext.config.ts, because rewrites are compiled into the routes manifest at build time: a mistake there is invisible until it is deployed.LANDING_HOSTSoverrides it at build time, which is also how this was verified locally.Verification
Against a production build with the production defaults, by
Hostheader:/sterish.xyzwww.sterish.xyzSTERISH.XYZapp.sterish.xyzlocalhostnot-sterish.xyzsterish.xyz.attacker.example/landing,/check,/activity,/brand,/licences,/licences/{address}and/skills/{id}unchanged on every host; an unknown path still 404s.10 new tests, 186 green in
frontend.pnpm typecheck,pnpm lint,pnpm test,pnpm buildall green. No coverage gate on the frontend (that gate is the contracts'cargo llvm-cov).Scope note
frontend/belongs to @AncungAulia and @sharkzneverending. This change is confined to routing config, its tests and docs — no landing markup and no dashboard page is touched.Follow-up, deliberately not done here: a canonical URL for the landing page, which now answers on two paths (
/on the apex,/landingeverywhere). That belongs with the polish pass in STE-24. The apex →www308 is a Vercel domain setting, not in this repo; both hosts are matched so the rewrite holds whichever way it points.Linear: STE-57 · docs:
docs/deployments.md"One deployment, two front doors",frontend/README.md"Which host serves what"cc @axel @fable for review