Skip to main content
Version: 1.8.0

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 iptower on the header itself

Files Modified:

  • app/util/documentIngest.js - Shared header guard
  • app/routes/documents.js - Guard document create
  • app/routes/files.js - Guard POST /files/upload/
  • app/routes/files-big.js - Guard the same path on the upload API

Release fragment: fix-require-agent-header