PUT /?referer HTTP 1.1Host:<BucketName-APPID>.<Region>.myqcloud.comDate:GMT DateAuthorization: Auth StringContent-Length:lengthContent-MD5:MD5
<RefererConfiguration><Status>Enabled</Status><RefererType>White-List</RefererType><DomainList><Domain>*.qq.com</Domain><Domain>*.qcloud.com</Domain></DomainList><EmptyReferConfiguration>Allow</EmptyReferConfiguration></RefererConfiguration>
名称 | 父节点 | 描述 | 类型 | 必选 |
RefererConfiguration | 无 | 防盗链配置信息 | Container | 是 |
Status | RefererConfiguration | 是否开启防盗链,枚举值:Enabled、Disabled | String | 是 |
RefererType | RefererConfiguration | 防盗链类型,枚举值:Black-List、White-List | String | 是 |
DomainList | RefererConfiguration | 生效域名列表, 支持多个域名且为前缀匹配, 支持带端口的域名和 IP, 支持通配符 * ,做二级域名或多级域名的通配 | Container | 是 |
Domain | DomainList | 单条生效域名 例如 www.qq.com/example ,192.168.1.2:8080 , *.qq.com | String | 是 |
EmptyReferConfiguration | RefererConfiguration | 是否允许空 Referer 访问,枚举值:Allow、Deny,默认值为 Deny | String | 否 |
PUT /?referer HTTP 1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 25 Feb 2017 04:10:22 GMTAuthorization:q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1547105134;32526689134&q-key-time=1547105134;32620001134&q-header-list=content-md5;content-type;host&q-url-param-list=referer&q-signature=0f7fef5b1d2180deaf6f92fa2ee0cf87ae83f****Content-MD5: kOz7g54LMJZjxKs070V9jQ==Content-Type: application/xml<RefererConfiguration><Status>Enabled</Status><RefererType>White-List</RefererType><DomainList><Domain>*.qq.com</Domain><Domain>*.qcloud.com</Domain></DomainList><EmptyReferConfiguration>Allow</EmptyReferConfiguration></RefererConfiguration>
HTTP/1.1 200 OKContent-Length: 0Connection: keep-aliveDate: Fri, 25 Feb 2017 04:10:22 GMTServer: tencent-cosx-cos-request-id: NTg3ZjFjMmJfOWIxZjRlXzZmNDhf****
本页内容是否解决了您的问题?