问题
I am trying to upload an image to my Amazon S3 bucket. But I keep getting this CORS error, even though I have set the CORS configuration correctly. This is my CORS configuration:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
</CORSRule>
<CORSRule>
<AllowedOrigin>http://localhost:3000</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
I would appreciate the help.
回答1:
I found out that this issue resolved after a few hours by itself.
来源:https://stackoverflow.com/questions/52852612/response-for-preflight-is-invalid-redirect-for-aws-s3