Disables the CORS function for a specified bucket and clears all CORS rules.

Request syntax

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

Detail analysis

  • If the requested bucket does not exist, OSS returns the 404 No Content error with the error code: NoSuchBucket.
  • Only the owner of a bucket can delete the CORS rules for the bucket. If you perform the DeleteBucketcors operation on a bucket that is not owned by you, a 403 Forbidden error is returned with the error code: Accessdenied.


Request example:

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

Response example:

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