Repository navigation
v6.2.0
·
245 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
[6.2.0] — 2026-10-27
Added
- Scaffolded apps can be framed by their appCentral portal, and only by it. When the platform
injectsAPPCENTRAL_PORTAL_ORIGIN(e.g.https://appcentral-uat.cpfnet.gov.sg) and it matches
^https://[a-z0-9-]+(\.[a-z0-9-]+)+$, the app sendsContent-Security-Policy: frame-ancestors <origin>with its other CSP directives and noX-Frame-Options. Unset or invalid keeps
X-Frame-Options: DENY+frame-ancestors 'none'. Exactly one origin, never*; dev behaviour
is unchanged. A unit test per backend/Next.js stack covers the origin check.- Next.js:
headers()is build-time, so the CSP andX-Frame-Optionsmove to the runtime proxy.
The scaffold seedssrc/lib/security/frame-protection.ts(applyFrameProtection, the only place
the CSP is defined) and a minimalsrc/proxy.ts;templatecentral:add (auth)keeps the call by
wrapping its routing inroute().next.config.tsno longer sends a CSP orX-Frame-Options.
Responses on/api/external/*(the full-stack-pairing backend rewrite) are left untouched, so
they keep the backend's stricter headers. Build output, optimised images andfavicon.icoget no
CSP (not documents). - Vite + React:
docker/15-frame-protection.envsh(sourced by the nginx entrypoint before
envsubst) always exportsTC_FRAME_ANCESTORS/TC_X_FRAME_OPTIONS, so nginx never sees an
undefined variable;nginx.conf.templatereads them. - FastAPI:
CommonSettings.APPCENTRAL_PORTAL_ORIGIN, validated byframe_ancestors()in
core/security_headers.py(re.fullmatch). - NestJS:
appConfig.APPCENTRAL_PORTAL_ORIGIN, validated byportalFrameAncestor()in
security.setup.ts;frameguardis off only when a valid origin is set.
- Next.js:
templatecentral:migrategains a "Portal framing" recipe (migrate/portal-frame-ancestors.md)
for projects scaffolded before this change.
Changed
nextjs-backend-extractiondetects auth from abetter-authimport inproxy.ts, not from the
file's presence, because every scaffold now shipssrc/proxy.ts.tc-audit,standards/code-standards/nestjs.md,standards/full-stack-pairingand
.claude/rules/nextjs.mddescribe the new default-deny / portal-origin rule.