Require Bcyip-Agent to create a file or a document
Version: 1.8.0 Date: 2026-10-18
Goal: A request with no agent header must not create a file or a document on the legacy API.
Solution: Return 400 when Bcyip-Agent is missing or blank on POST /api/documents and POST /api/files/upload/ (main API and the big-file upload API). Any non-empty header value is accepted. The value is not checked against agent_codes.
Features:
- Missing or blank
Bcyip-Agent→ 400 before the file or document is created - No exception for
iptoweron the header itself
Files Modified:
app/util/documentIngest.js- Shared header guardapp/routes/documents.js- Guard document createapp/routes/files.js- GuardPOST /files/upload/app/routes/files-big.js- Guard the same path on the upload API
Release fragment: fix-require-agent-header