Skip to content

Harden uploads, request limits, and external calls - #4

Open
1816x wants to merge 3 commits into
mainfrom
fix/public-api-hardening
Open

Harden uploads, request limits, and external calls#4
1816x wants to merge 3 commits into
mainfrom
fix/public-api-hardening

Conversation

@1816x

@1816x 1816x commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • disable document uploads by default while keeping the workspace visible and clearly locked
  • enforce matching request, field, chunking, and search limits in FastAPI and Next.js
  • time out Claude after 30 seconds with SDK retries disabled, returning an explicit 504
  • close CORS by default and allow only configured exact origins
  • expose upload state and active limits through /stats
  • preserve backend 403, 413, 422, and 504 responses through the Next.js proxy
  • document deployment flags and add hardening regression coverage

Deployment behavior

fly.toml explicitly keeps public uploads and CORS disabled. Startup corpus seeding still writes directly to the in-memory store. Enabling the upload UI or scripts/seed.py requires RAG_UPLOADS_ENABLED=1.

Validation

GitHub Actions runs:

  • Rust formatting, clippy, and tests
  • Python binding tests
  • RAG service tests
  • Next.js production build

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