0033-00000002
Updated at:
Problem description
The request body XML configuration is missing a required element.
Cause
You called the PutBucketReferer operation to configure Hotlink Protection. The request body XML configuration is missing the required AllowEmptyReferer element.
Example
The following request body XML configuration is missing the required AllowEmptyReferer element:
PUT /?referer HTTP/1.1
Date: Fri, 24 Feb 2017 03:15:40 GMT
Content-Length:322
Content-Type: application/xml
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
<AllowTruncateQueryString>false</AllowTruncateQueryString>
<RefererList>
<Referer>http://www.aliyun.com</Referer>
</RefererList>
</RefererConfiguration>
Solution
Add the AllowEmptyReferer element to the request body XML. This element specifies whether requests with an empty Referer field can access OSS. Valid values:
true (default): Requests with an empty Referer field can access OSS.
false: Requests with an empty Referer field cannot access OSS.
The following request is valid:
PUT /?referer HTTP/1.1
Date: Fri, 24 Feb 2017 03:15:40 GMT
Content-Length:322
Content-Type: application/xml
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
<AllowEmptyReferer>false</AllowEmptyReferer>
<AllowTruncateQueryString>false</AllowTruncateQueryString>
<RefererList>
<Referer>http://www.aliyun.com</Referer>
</RefererList>
</RefererConfiguration>
References
Is this page helpful?