Delete Bucket cors

Last Updated: Mar 21, 2017

The Delete Bucket cors operation is used to disable the CORS function for a specified bucket and clear all the rules.

Request syntax

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

Detail analysis

  • If the bucket does not exist, the error 404 No Content with the error code: NoSuchBucket will be returned.
  • Only the bucket owner can delete the CORS rules of this bucket. If you try to operate a bucket which does not belong to you, OSS returns the error 403 Forbidden with the error code: AccessDenied.

Example

Request example:

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

Response example:

  1. HTTP/1.1 204 No Content
  2. x-oss-request-id: 5051845BC4689A033D0022BC
  3. Date: Fri, 24 Feb 2012 05:45:34 GMT
  4. Connection: keep-alive
  5. Content-Length: 0
  6. Server: AliyunOSS
Thank you! We've received your feedback.