response for preflight is invalid (redirect) for aws s3

风格不统一 提交于 2021-02-09 08:38:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!