Skip to content

Routing reference

This page maps apps/cosmos/digital-services/src/pages routes to ownership and edge behavior.

RouteSource filePrimary ownerNotes
/src/pages/index.astroAstro page + Layout.astroMarketing landing page.
/contactsrc/pages/contact.astroAstro page + contact form scriptsUses PUBLIC_CONTACT_FORM_WORKER_URL.
/loginsrc/pages/login.astroAstro page + Cloudflare Access flowEntry point before protected routes.
/maintenancesrc/pages/maintenance.astroAstro middleware gateActivated by PUBLIC_MAINTENANCE_MODE.
/portalsrc/pages/portal.astroAstro page, edge-protectedProtected by gateway worker prefix rules.
/portal/outgoing-mailsrc/pages/portal/outgoing-mail.astroAstro UI + worker-backed APIProtected route and authenticated tool flow.
/solutions/automationsrc/pages/solutions/automation.astroAstro marketing pageShared UI composition.
/solutions/consultingsrc/pages/solutions/consulting.astroAstro marketing pageShared UI composition.
/solutions/ecommercesrc/pages/solutions/ecommerce.astroAstro marketing pageShared UI composition.
/solutions/webdesignsrc/pages/solutions/webdesign.astroAstro marketing pageShared UI composition.
/robots.txtsrc/pages/robots.txt.tsAstro API routeGenerates sitemap URL from site/env.
/sitemap.xmlsrc/pages/sitemap.xml.tsAstro API routeUses explicit route list (SITEMAP_ENTRIES).
  • /api/* is owned by workers/auth-gateway.js route matching in workers/wrangler.gateway.toml.
  • /api/auth/session and /api/auth/logout are gateway worker endpoints, not src/pages files.
  • /portal* and /admin* protection comes from gateway route + PROTECTED_PATH_PREFIXES.
  • Image optimization is route-claimed by workers/wrangler.image.toml and workers/image-optimizer.js.
  • Page content and markup: src/pages/*.
  • Global nav/auth link and metadata defaults: src/layouts/Layout.astro.
  • Route-wide maintenance override: src/middleware.ts.
  • Auth/session/logout/protected redirect behavior: workers/auth-gateway.js.
  • Add/rename route in src/pages: verify sitemap and navigation impact.
  • Add protected route under /portal or /admin: confirm Wrangler routes and prefixes still cover it.
  • Add browser API calls: validate CSP connect-src/form-action in public/_headers.