The platform is dropping Caddy: Atrium's backend becomes the front door and
forwards /counsel/* with the prefix stripped, so Counsel must answer for
everything Caddy did for it.
- app/edge.py: SecurityHeaders (pure ASGI, so every response is stamped,
404/405/413/500 included) with Caddy's exact set: nosniff, no-referrer,
the same CSP with frame-ancestors from FRAME_ANCESTORS, X-Frame-Options
DENY or SAMEORIGIN to match, HSTS only over https. BodySizeLimit caps a
request at 100 MB, by Content-Length and while reading a chunked body.
SpaStaticFiles is try_files {path} /index.html. ConsoleUnlessApi keeps
/api and /healthz from ever falling to the console (405 with Allow, or
404), comparing route paths, never the prefixed URL.
- FRAME_ANCESTORS: 'none' (default, unframable) or 'self' (Atrium's frame);
anything else refuses to start.
- GET/HEAD /healthz answers 200 without the database; GZipMiddleware.
- Dockerfile: the frontend comes in as a named build context; uvicorn runs
with --proxy-headers, --forwarded-allow-ips and --no-server-header.
- Standalone compose: no Caddy, the backend is published on :80; TLS is
the operator's own terminator in front. Caddyfile deleted.
- README, CLAUDE.md, SECURITY.md and .env.example follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
460 B
Plaintext
20 lines
460 B
Plaintext
# Normalize line endings. Critical for shell scripts and configs that run inside
|
|
# Linux containers (a CRLF in db/init/01-roles.sh would break its shebang).
|
|
* text=auto eol=lf
|
|
|
|
*.sh text eol=lf
|
|
*.py text eol=lf
|
|
*.yml text eol=lf
|
|
*.yaml text eol=lf
|
|
*.sql text eol=lf
|
|
*.toml text eol=lf
|
|
*.md text eol=lf
|
|
*.html text eol=lf
|
|
Dockerfile text eol=lf
|
|
.env.example text eol=lf
|
|
|
|
# Binary assets (never normalize).
|
|
*.png binary
|
|
*.jpg binary
|
|
*.ico binary
|