Fix ‘No Access-Control-Allow-Origin header’ errors on Amazon S3 by testing the preflight with curl
S3 sends no Access-Control-Allow-Origin header for several reasons. Send one curl preflight, read S3's answer, and apply the one fix that matches.
Step-by-step fixes for common S3 storage errors: CORS failures, SignatureDoesNotMatch and broken presigned URLs, on AWS S3, MinIO, R2 and B2.
S3 sends no Access-Control-Allow-Origin header for several reasons. Send one curl preflight, read S3's answer, and apply the one fix that matches.
Presigned URL shows http://minio:9000 and the browser can't reach it? Sign with a second S3 client on the public endpoint. JS v3 and boto3 code, Compose, curl.
MinIO CORS error? Community MinIO has one server-wide origin list; AIStor adds per-bucket rules. Set the right one, then check the preflight with curl.
Presigned upload works in curl but fails in the browser? Compare X-Amz-SignedHeaders with what the browser sent, then fix Content-Type, checksums, URL or keys.