Skip to content

Allow anonymous reads of hosted public images through the portal auth gate - #441

Merged
alexeygrigorev merged 1 commit into
mainfrom
fix/public-images-anonymous-read
Nov 13, 2026
Merged

alexeygrigorev merged 1 commit into
mainfrom
fix/public-images-anonymous-read

Conversation

@alexeygrigorev

Copy link
Copy Markdown
Member

Live AC5 check for intake 4955a821 found prod returning 401 for GET /api/public-images/:id (the shared hosting from #439). The portal browser-auth gate in backend/src/docs/portal.ts runs only when Cognito is configured, so local/e2e runs passed, but on prod a sponsor/guest opening a brief by access code got the upload stored and then a broken image.

  • Allowlist isAnonymousPublicImageRequest (GET only) in the portal gate next to the sponsor-doc allowlist. POST/DELETE stay signed-in only.
  • Regression test in the portal-mode suite (docs-portal.test.ts): anonymous GET returns the bytes, anonymous POST/DELETE stay 401. Fails without the fix, passes with it.

Also unblocks intake c342af2b (sponsor graphics), which reuses this hosting.

…th gate

Prod returned 401 for GET /api/public-images/:id because the portal's
browser-auth gate (only active when Cognito is configured) did not
allowlist it, so sponsors opening a brief by access code saw the
uploaded image fail to load. Add it next to the sponsor-doc allowlist
and cover it in the portal-mode suite.

Intake 4955a821 (AC5 live check).
@alexeygrigorev
alexeygrigorev merged commit cfa9c5d into main Nov 13, 2026
4 checks passed
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