dorfteich/apps/api
Claude Fable 5 e606b869d8
All checks were successful
CI / Lint, typecheck, test (pull_request) Successful in 5m12s
CI / Build container images (pull_request) Successful in 2m48s
CI / Auth e2e pack (pull_request) Successful in 7m50s
CI / Import/export fidelity gate (pull_request) Successful in 55s
#197: security response headers and an explicitly restrictive CORS policy
Hand-rolled middleware instead of helmet: the header set is small enough
to own, every value is a deliberate decision, and the api gains no
transitive dependency. HSTS (no includeSubDomains — the api cannot speak
for sibling subdomains), nosniff, Referrer-Policy no-referrer,
X-Frame-Options SAMEORIGIN (not DENY: the plugin sandbox frame embeds
same-origin and its CSP has no frame-ancestors, so this header governs),
and a minimal deny-all Permissions-Policy.

CORS grants no foreign origin anything; only the APP_BASE_URL origin is
ever echoed (where browsers do not consult CORS anyway), with
Vary: Origin on every response. No preflight handling — same-origin
requests never preflight, and cross-origin API access is cookie-less by
design (PAT/Bearer).

Wired via the AppModule MiddlewareConsumer so createTestApp boots the
identical middleware. Fences: security-headers.e2e.test.ts (header set,
foreign origin gets no ACAO) and a frame assertion in
plugins.e2e.db.test.ts (framing stays possible). Rationale table in
security.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0168Ph5uBmHm8X28CSVpbpnJ
2026-07-30 17:10:35 +02:00
..
prisma #195: trashed content leaves the search index itself 2026-07-30 14:07:34 +02:00
src #197: security response headers and an explicitly restrictive CORS policy 2026-07-30 17:10:35 +02:00
.swcrc Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
Dockerfile Extend readyz with backup freshness and a degraded status level (#85) 2026-07-11 19:02:59 +02:00
nest-cli.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
package.json Built-in MCP endpoint (Streamable HTTP) on top of the public API (#105) 2026-07-12 11:36:02 +02:00
tsconfig.build.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
tsconfig.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
vitest.config.ts Add user, identity, session, and auth-support data model 2026-07-05 00:42:22 +02:00
vitest.global-setup.ts Add the first-run setup wizard API with env-backed secret store (#80) 2026-07-11 15:10:28 +02:00