Allow the File library byte routes in table-file-transport

The File library serves its bytes through /api/library-file-uploads and
/api/library-files, mirroring the table-file routes beside them (CMS ADR 0183).
ConnectRPC carries neither a resumable chunk nor a range-streamed body, so the
same file keeps three more exact-target allowances.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-09-17 01:53:36 +08:00
parent fd26aa76dc
commit 8b2e2f1b10

View File

@ -85,6 +85,9 @@ var allowedNonProtoFetches = []nonProtoFetchAllowance{
{file: "lib/table-file-transport.ts", target: "/api/table-file-uploads/${sessionId}", reason: "bounded resumable binary chunks with durable offsets; controls use generated RPC hooks"}, {file: "lib/table-file-transport.ts", target: "/api/table-file-uploads/${sessionId}", reason: "bounded resumable binary chunks with durable offsets; controls use generated RPC hooks"},
{file: "lib/table-file-transport.ts", target: "/api/table-files/${attachmentId}/content?version=${versionId}", reason: "authenticated exact-version binary download; access is rechecked at open"}, {file: "lib/table-file-transport.ts", target: "/api/table-files/${attachmentId}/content?version=${versionId}", reason: "authenticated exact-version binary download; access is rechecked at open"},
{file: "lib/table-file-transport.ts", target: "/api/table-files/${attachmentId}/preview?version=${versionId}", reason: "bounded safe binary/text preview; no raw document embedding"}, {file: "lib/table-file-transport.ts", target: "/api/table-files/${attachmentId}/preview?version=${versionId}", reason: "bounded safe binary/text preview; no raw document embedding"},
{file: "lib/table-file-transport.ts", target: "/api/library-file-uploads/${sessionId}", reason: "bounded resumable binary chunks for the File library store; controls use generated RPC hooks"},
{file: "lib/table-file-transport.ts", target: "/api/library-files/${attachmentId}/content?version=${versionId}", reason: "authenticated exact-version Library file download; access is rechecked at open"},
{file: "lib/table-file-transport.ts", target: "/api/library-files/${attachmentId}/preview?version=${versionId}", reason: "bounded safe binary/text preview of a Library file; no raw document embedding"},
{ {
file: "components/admin/backups/restore-new-instance-dialog.tsx", file: "components/admin/backups/restore-new-instance-dialog.tsx",
target: "/api/push/upload?account_id=${encodeURIComponent(accountId)}", target: "/api/push/upload?account_id=${encodeURIComponent(accountId)}",