If you're trying to publicly distribute files from an Amazon S3 bucket, you may have come across this error in the past:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at your-s3-bucket.com. (Reason: CORS request did not succeed).Code language: CSS (css)
In the new (2020) S3 interface/dashboard, you need to write the header as a JSON. This code will fix the S3 Access-Control-Allow-Origin Header, allowing for GET requests from any domain.
This code is placed in the Cross-origin resource sharing (CORS) section of the permissions tab for your specific bucket.
On the dashboard, it would look like this:
Further reading: https://stackoverflow.com/questions/17533888/s3-access-control-allow-origin-header