Skip to content

CMS pages override shipped routes (reserved-slug blacklist) — v0.37.0-beta#42

Merged
WebTigers merged 1 commit into
mainfrom
feat/cms-overrides-routes
Jul 22, 2026
Merged

CMS pages override shipped routes (reserved-slug blacklist) — v0.37.0-beta#42
WebTigers merged 1 commit into
mainfrom
feat/cms-overrides-routes

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

What

Tiger_Controller_Plugin_PageDispatch was a pure 404 fallback — a published page only rendered when no controller claimed the URL. So shipped routes (the /vibe, /agency, … marketing aliases in configs/routes.ini) could never be replaced by CMS content.

This flips it: a published page whose slug matches the request now wins, overriding a matched static route. An admin can swap any built-in landing page for real, editable, SEO'd CMS content just by giving a page that slug — no code, no route edit.

The guard — reserved-slug blacklist

A page may claim any slug except reserved namespaces, so it can never shadow application routes:

  • every registered module namespace (/admin, /api, /docs, /pay, /blog, …) — built per request from the live module list, so newly installed modules are protected automatically;
  • the core default-module system controllers (admin, auth, error, install, login, logout, page).

Unchanged: root / still routes to IndexController (the admin-chosen home page); unmatched slugs still 301 via page_redirect or fall through to a clean 404; fail-open throughout (a broken lookup never takes down routing).

Verified on dev (live DB)

Path Result
/features (throwaway published page) 200 → the CMS page (won over the static /features route)
/vibe, /agency (no page) 200 → shipped marketing pages (fallback)
/docs, /api 200 (reserved module — untouched)
/admin 302 → login (reserved — untouched)
/builder-test (existing page) 200 (still works)
/nonexistent-xyz 404

Notes

  • Feature → minor bump 0.36.0 → 0.37.0-beta; CHANGELOG updated.
  • Smoke test unaffected: /vibe stays 200 (falls through to the shipped page when no CMS page exists).

🤖 Generated with Claude Code

…list) (v0.37.0-beta)

PageDispatch was a pure 404-fallback: a published page only rendered when no
controller claimed the URL, so shipped routes like the /vibe marketing alias
could never be replaced by CMS content.

Now a published `page` whose slug matches the request WINS — overriding a matched
static route — so an admin can swap any built-in landing page for real, editable,
SEO'd CMS content just by giving a page that slug. The guard is a reserved
blacklist built per request from the live module list: every registered module
namespace (/admin, /api, /docs, /pay, …) plus the core default-module system
controllers stay off-limits, so a page can never shadow application routes.

Root `/` unchanged (IndexController serves the admin-chosen home page); unmatched
slugs still 301 via page_redirect or fall to a clean 404; fail-open throughout.

Verified on dev against the live DB: a page at slug `features` served over the
static /features route; /vibe /agency (no page) still rendered the shipped pages;
/docs /api /admin untouched; /nonexistent 404.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WebTigers
WebTigers merged commit dcefed8 into main Jul 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant