feat: healthcheck, security headers, prod-readiness checklist#68
Merged
Conversation
Code-deliverable parts of the production-readiness work (#59): - GET /api/health pings the database (200 ok / 503 down), unauthenticated and side-effect free, for liveness/readiness probes. - Baseline security headers on every response in next.config.ts (X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, HSTS, DNS-prefetch off). Strict CSP tracked as a follow-up (needs App Router nonces). - docs/production-readiness.md tracks the checklist with status and a zero-PII/secrets logging policy. The README WIP banner stays: DB backups (tied to the deferred hosting decision) and a strict CSP are still pending. Refs #59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ships the code-deliverable parts of the production-readiness work. Refs #59 (does not close it).
How
GET /api/health: pings the DB (SELECT 1), returns 200{status:"ok",db:"up"}or 503{status:"error",db:"down"}. Unauthenticated, side-effect free, no PII; for liveness/readiness probes.next.config.ts:X-Frame-Options: DENY,X-Content-Type-Options: nosniff,Referrer-Policy,X-DNS-Prefetch-Control: off,Permissions-Policy(camera/mic/geo off),Strict-Transport-Security(2y, includeSubDomains, preload).docs/production-readiness.md: checklist with per-item status plus a zero-PII/secrets logging policy.Still pending (WIP banner stays)
Content-Security-Policy(needs App Router per-request nonces).Refs #59
🤖 Generated with Claude Code