Skip to content

fix: nginx routing, security headers, CORS#23

Merged
SPerekrestova merged 1 commit intomainfrom
fix/infrastructure-hardening
Mar 25, 2026
Merged

fix: nginx routing, security headers, CORS#23
SPerekrestova merged 1 commit intomainfrom
fix/infrastructure-hardening

Conversation

@SPerekrestova
Copy link
Copy Markdown
Owner

Summary

  • Route all FastAPI paths (/docs, /redoc, /openapi.json, /admin/*) through nginx (MED-3)
  • Add HSTS, X-Content-Type-Options, X-Frame-Options security headers (MED-4)
  • Add CORS headers for Swagger UI and future web clients (LOW-1)
  • Hide nginx version with server_tokens off (LOW-3)
  • Rate limiting preserved on /analyze and /interactions only

Test plan

  • Deploy and verify /docs returns Swagger UI (currently 404)
  • Verify response headers include HSTS, X-Content-Type-Options, X-Frame-Options
  • Verify Server: header no longer includes nginx version
  • Verify CORS preflight (OPTIONS) returns 204

🤖 Generated with Claude Code

- Route /docs, /redoc, /openapi.json, /admin/* through to FastAPI
  (previously returned 404)
- Add HSTS, X-Content-Type-Options, X-Frame-Options headers
- Hide nginx version with server_tokens off
- Add CORS headers for Swagger UI / future web clients
- Rate limiting preserved on /analyze and /interactions only

Fixes QA report MED-3, MED-4, LOW-1, LOW-3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SPerekrestova SPerekrestova merged commit 6ff40b4 into main Mar 25, 2026
3 checks passed
@SPerekrestova SPerekrestova deleted the fix/infrastructure-hardening branch March 25, 2026 10:44
SPerekrestova added a commit that referenced this pull request Mar 25, 2026
Combines dosage/fallback changes with input hardening (PR #22) and
infrastructure (PR #23) changes. All 160 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant