0003-00000502

更新时间:
复制 MD 格式

Problem description

The bucket's hotlink protection configuration denied your request.

Causes

The Referer header in your request matches a value in the bucket's Referer blacklist.

Check the bucket's RefererConfiguration to identify which rule triggered the block before applying a fix.

Examples

The following bucket has both a whitelist and a blacklist configured:

<RefererConfiguration>
  <AllowEmptyReferer>false</AllowEmptyReferer>
  <RefererList>
    <Referer>http://*.aliyuncs.com</Referer>
  </RefererList>
  <RefererBlacklist>
    <Referer>http://abc.aliyuncs.com</Referer>
  </RefererBlacklist>
</RefererConfiguration>

The following request is denied because http://abc.aliyuncs.com is in the RefererBlacklist:

GET /test.txt HTTP/1.1
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: BucketName.oss-example-endpoint.aliyuncs.com
Referer: http://abc.aliyuncs.com

Solutions

Choose the solution that applies to your role.

If you control the request

Change the Referer header to a value that is not in the bucket's Referer blacklist. If the bucket also has a whitelist configured, the new value must also be in the whitelist.

GET /test.txt HTTP/1.1
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: BucketName.oss-example-endpoint.aliyuncs.com
Referer: http://test.aliyuncs.com

If you own the bucket

Modify the Referer configuration of the bucket to allow access from specified Referers. For instructions, see Hotlink protection.