dorfteich/apps/api/src/common
Claude Fable 5 3c62b7b773
All checks were successful
CI / Lint, typecheck, test (pull_request) Successful in 5m15s
CI / Build container images (pull_request) Successful in 1m9s
CI / Auth e2e pack (pull_request) Successful in 7m43s
CI / Import/export fidelity gate (pull_request) Successful in 56s
CD / Build and push images (push) Successful in 19s
CD / Deploy to Test (push) Successful in 12s
CD / Smoke tests against Test (push) Successful in 1m29s
CD / Promote to Int (push) Successful in 14s
CI / Lint, typecheck, test (push) Successful in 5m24s
CI / Build container images (push) Has been skipped
CI / Auth e2e pack (push) Successful in 7m35s
CI / Import/export fidelity gate (push) 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:13:24 +02:00
..
api-exception.filter.ts Add auth, settings, and admin UI to the SPA 2026-07-05 05:35:56 +02:00
clock.service.ts Add page trash: soft delete, restore, and purge job (#31) 2026-07-08 12:48:17 +02:00
common.module.ts Add page trash: soft delete, restore, and purge job (#31) 2026-07-08 12:48:17 +02:00
mask-token-param.test.ts #191: feeds.enabled instance switch, feed-token log masking 2026-07-30 11:34:43 +02:00
mask-token-param.ts #191: feeds.enabled instance switch, feed-token log masking 2026-07-30 11:34:43 +02:00
security-headers.e2e.test.ts #197: security response headers and an explicitly restrictive CORS policy 2026-07-30 17:13:24 +02:00
security-headers.middleware.ts #197: security response headers and an explicitly restrictive CORS policy 2026-07-30 17:13:24 +02:00
zod-validation.pipe.ts Add authentication: signup, verification, sessions, password reset 2026-07-05 05:22:31 +02:00