DeleteBucketCors

DeleteBucketCors用于关闭指定存储空间(Bucket)对应的跨域资源共享CORS(Cross-Origin Resource Sharing)功能并清空所有规则。

请求语法

DELETE /?cors HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

请求头

此接口仅使用公共请求头部,详情请参见公共请求头(Common Request Headers)

响应头

此接口仅返回公共响应头部,详情请参见公共响应头(Common Response Headers)

示例

请求示例

DELETE /?cors HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com  
Date: Fri, 24 Feb 2012 05:45:34 GMT  
Authorization: OSS qn6q**************:77Dv****************

返回示例

HTTP/1.1 204 No Content 
x-oss-request-id: 5051845BC4689A033D00****
Date: Fri, 24 Feb 2012 05:45:34 GMT
Connection: keep-alive
Content-Length: 0  
Server: AliyunOSS

SDK

此接口所对应的各语言SDK如下:

错误码

错误码

HTTP 状态码

描述

NoSuchBucket

404

目标Bucket不存在。

AccessDenied

403

没有删除权限。只有Bucket的拥有者才有权限删除Bucket对应的CORS规则。