FAQ
Why is /api/auth/session returning HTML instead of JSON?
Section titled “Why is /api/auth/session returning HTML instead of JSON?”The request is likely bypassing the gateway worker. Check workers/wrangler.gateway.toml route coverage for your hostname/environment.
Why does /portal/outgoing-mail redirect to /login?
Section titled “Why does /portal/outgoing-mail redirect to /login?”The route is protected by worker logic. Verify Cloudflare Access/session token presence and AUTH_WORKER_VERIFY_URL correctness.
Where should I add new pages?
Section titled “Where should I add new pages?”Under apps/cosmos/digital-services/src/pages. Use Layout.astro unless you have a deliberate exception.
Where do metadata defaults live?
Section titled “Where do metadata defaults live?”In src/layouts/Layout.astro, which passes values into shared SeoHead.
How do I run tests for this app only?
Section titled “How do I run tests for this app only?”From repo root:
yarn workspace cosmos-digital-services test:unityarn workspace cosmos-digital-services test:e2eDo I need to update docs when changing config/env/routes?
Section titled “Do I need to update docs when changing config/env/routes?”Yes. Update the relevant reference/operations/contributing docs in apps/cosmos/digital-services/docs.