简体   繁体   中英

CORS Configuration in s3: Unknown field AllowedHeaders

I am setting up a coors configuration in my s3 bucket and I am getting an error when I save:

Unknown field AllowedHeaders

I followed their doc https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html which uses AllowedHeaders so I am not sure why it is not allowing me to save this policy. i thought maybe there is a syntax error or something like that but I am not seeing anything. I am hoping someone else has solved this problem before and could advise me on why its not saving.

 {
   "Version":"2012-10-17",
   "Statement":[
     {
       "AllowedHeaders" : [ "Authorization", "Content-Length" ],
       "AllowedMethods" : [ "GET" ],
       "AllowedOrigins" : [ "*" ],
       "ExposedHeaders" : [ ],
       "MaxAge" : 3000
      }
    ]
  }

The CORS policy needs to be placed in the "Cross-origin resource sharing (CORS)" section at the bottom of the S3 bucket's permissions tab.

You seem to be trying to merge it with your "Bucket policy" (which goes three sections earlier)

S3配置页面截图

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM