[P2] feat: wire validation, logging, error handling, CSP into Express

↗ view on GitHub · Dshamir · 2026-05-23 · 7f2aa547

- Add requestId, globalErrorHandler middleware to Express pipeline
- Initialize error tracking (GlitchTip/Sentry) before app setup
- Enable CSP via Helmet with strict directives
- Replace all console.log/error/warn with Pino structured logger
- Fix file-type ESM module resolution with @ts-ignore

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Repository Dshamir/AI-Legal
Author Dshamir <dshamir@blucap.ca>
Authored
Parents 25e099b1
Stats 11 files changed , +118 , -130
Part of Backend request hardening: validation, logging, error tracking, CSP

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-7f2aa547.md from inside the repo you want the change in.

⬇ Download capture-commit-7f2aa547.md