Unable to update AWS S3 CORS POLICY

前端 未结 3 2086
没有蜡笔的小新
没有蜡笔的小新 2021-02-19 10:18

I needed to change my AWS S3 bucket CORS policy to enable the upload of files for my ReactJS to AWS S3, but I keep getting this API response:

Expected params

3条回答
  •  不要未来只要你来
    2021-02-19 11:10

    To configure CORS for your static website the CORS object has to be in JSON format see aws docs cors configuration. To specify the actions allowed on that bucket you want to enable CORS on, you must define a set of CORS Rules. The CORS Rules is an array that holds a set of objects where each object corresponds to a particular rule. To learn more about how to define CORS Rules see aws cors rule. The error you are receiving is due the fact that your CORS Rule is in improper format. If you follow the above example by @FaitAccompli the error should be resolved.

提交回复
热议问题