【问题标题】:response for preflight is invalid (redirect) for aws s3对于 aws s3,预检响应无效(重定向)
【发布时间】:2019-03-21 23:58:49
【问题描述】:

我正在尝试将图像上传到我的 Amazon S3 存储桶。但是我不断收到这个 CORS 错误,即使我已经正确设置了 CORS 配置。 这是我的 CORS 配置:

    <?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>

我将不胜感激。

【问题讨论】:

    标签: amazon-web-services amazon-s3 cors


    【解决方案1】:

    我发现这个问题在几个小时后自行解决了。

    【讨论】:

      猜你喜欢
      • 2018-02-21
      • 2016-10-20
      • 2017-04-25
      • 2016-06-20
      • 2017-11-15
      • 1970-01-01
      • 2020-10-09
      • 2018-02-13
      • 2017-12-30
      相关资源
      最近更新 更多