您发起的请求头中没有Referer字段或Referer字段为空,与请求Bucket设置的防盗链策略不相符。

解决方案

您可以选择以下任意方案解决该问题。

  • 在请求中增加Referer请求头。

    GET /test.txt HTTP/1.1
    Date: Tue, 20 Dec 2022 08:48:18 GMT
    Host: BucketName.oss-example-endpoint.aliyuncs.com
    Referer: https://help.example.com
    
  • 将请求所在Bucket的防盗链策略中AllowEmptyReferer取值设置为true。

    <RefererConfiguration>
      <AllowEmptyReferer>true</AllowEmptyReferer>
    </RefererConfiguration>
Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐