Disables cross-origin resource sharing (CORS) for a bucket and deletes all CORS rules.
Request syntax
DELETE /? cors HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Response headers
This operation returns only common response headers. For more information, see Common response headers.
Examples
Sample request
DELETE /? cors HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Thu, 17 Apr 2025 05:45:34 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
Sample response
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
OSS SDKs
Call DeleteBucketCors with the following OSS SDKs:
ossutil
For information about the ossutil command that corresponds to the DeleteBucketCors operation, see delete-bucket-cors.
Error codes
|
Error code |
HTTP status code |
Description |
|
NoSuchBucket |
404 |
The specified bucket does not exist. |
|
AccessDenied |
403 |
You are not authorized to perform this operation. Only the bucket owner can delete CORS rules. |