Menu

Browser CORS Explained — Go Runbook for Presigned Generated Image Upload to Object Storage
📰

Browser CORS Explained — Go Runbook for Presigned Generated Image Upload to Object Storage

DEV Community: go·KenjiTanaka6849·10 days ago
#31pABZSF
#devtogo#devto#dev#http#upload
Long article (1926 words) — no AI summary yet.
Reading 0:00
15s threshold

Short answer: Send large generated report images from the browser straight to object storage with a short-lived presigned PUT, but issue that permission only after authenticating the customer and selecting the correct US or EU bucket. Treat CORS as a browser permission check, signing as an exact-request contract, and regional placement as a separate data-control decision. Mixing those three planes is what makes this incident drag on.

The operational rule is direct: reproduce the failing preflight first, then compare the eventual PUT byte for byte with what the signing service authorized. Don't widen CORS until the upload works. A broad policy can hide an origin or header mismatch while also expanding who can attempt writes.

For a gaming SaaS, the object here is a generated customer report: perhaps a large match-analysis image or a rendered season summary. The application authorizes access; object storage moves the bytes.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.