Problem description
The request is denied by the hotlink protection configuration of the bucket.
Causes
The value of the Referer header in the request is in the Referer blacklist that is configured for the bucket.
Examples
For example, you want to access a bucket that has the following Referer configuration:
<RefererConfiguration>
<AllowEmptyReferer>false</AllowEmptyReferer>
<RefererList>
<Referer>http://*.aliyuncs.com</Referer>
</RefererList>
<RefererBlacklist>
<Referer>http://abc.aliyuncs.com</Referer>
</RefererBlacklist>
</RefererConfigurationYou initiate the following request to the bucket:
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.comYour request is denied because the value of the Referer header in the request is in the RefererBlacklist configuration of the bucket.
Solutions
Make sure that the value of the Referer header in your request is not in the Referer blacklist of the bucket.
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.comIf you are the owner of a bucket, you can modify the Referer configuration of the bucket to allow access from specified Referers. For more information, see Hotlink protection.