Home > front end >  ETagMissing: No access to ETag property on response. Check CORS configuration to expose ETag header
ETagMissing: No access to ETag property on response. Check CORS configuration to expose ETag header

Time:07-29

I am running into a error "ETagMissing: No access to ETag property on response. Check CORS configuration to expose ETag header." when running a multipart upload to AWS. I searched the whole net and cant find a way to add this Etag to my bucket CORS policy. I don't know the properties of it and theres no documnetation.

My current CORS policy:

[
{
    "AllowedHeaders": [
        "*"
    ],
    "AllowedMethods": [
        "GET",
        "PUT",
        "POST",
        "DELETE",
        "HEAD"
    ],
    "AllowedOrigins": [
        "*"
    ],
    "ExposeHeaders": []
}

]

CodePudding user response:

Check CORS configuration to expose ETag header.

The error message is telling you exactly what to do. Your CORS policy needs to add ETag in the ExposeHeaders array.

You currently have an empty ExposeHeaders array so all headers are being blocked by CORS.

CodePudding user response:

I knew i had to change my CORS policy but just did't know how or where to put the ETag. Figured it out with the following code below:

[
{
    "AllowedHeaders": [
        "*"
    ],
    "AllowedMethods": [
        "GET",
        "PUT",
        "POST",
        "DELETE",
        "HEAD"
    ],
    "AllowedOrigins": [
        "*"
    ],
    "ExposeHeaders": [
        "ETag"
    ]
}

]

  • Related