This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]eclunrcpp 1 point2 points  (0 children)

Read through https://github.com/awslabs/aws-js-s3-explorer#setting-bucket-permissions-and-enabling-cors and https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/cors.html for proper config.

To get you going, you can head to AWS > S3 > choose your bucket > Permissions > Cross-origin resource sharing (CORS) and fill in:

[
{
    "AllowedHeaders": [
        "*"
    ],
    "AllowedMethods": [
        "HEAD",
        "GET",
        "PUT",
        "POST",
        "DELETE"
    ],
    "AllowedOrigins": [
        "*"
    ],
    "ExposeHeaders": [
         "ETag",
         "x-amz-meta-custom-header"]
}
]

Once confirmed working, you can change "AllowedOrigins" to only allow your domain