If you're trying to publicly distribute files from an Amazon S3 bucket, you may have come across this error in the past:
Code language: CSS (css)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at your-s3-bucket.com. (Reason: CORS request did not succeed).
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: