-
Amazon S3
- S3 Bucket Acl Operations
- S3 Bucket Cors Operations
- S3 Bucket Is Stale Allowed Operations
- S3 Bucket Lifecycle Operation
- S3 Bucket List Uploads Operations
- S3 Bucket Location Operations
- S3 Bucket Operations
- S3 Bucket Versioning Operations
- S3 Bucket Versions Operations
- S3 Data Node Operation
- S3 Metadata Key List Operations
- S3 Metadata Key System List Operation
- S3 Metadata Search Operation
- S3 Multi Object Delete Operations
- S3 Object Acl Operations
- S3 Object Init Uploads Operations
- S3 Object Operations
- S3 Object Uploads Operations
- S3 Options Operations
- S3 Ping Operation
- EMC Atmos
- OpenStack SWIFT

Set Bucket CORS
Sets the CORS configuration for the bucket.
URL Format
Host Style: http://bucketname.ns1.emc.com/?cors
Path Style: http://ns1.emc.com/bucketname?cors
Request Headers
Content-MD5 | required | 128-bit MD5 digest of data which is base64 encoded. This is used to verify that the request was not corrupted during transit. |
x-amz-date | optional | Timestamp of the request added by the requester. Example: Tue, 03 Sept 2013 12:00:00 GMT. If the Authorization header is specified, either the x-amz-date or the Date header must also be specified If both the headers are specified, the value of x-amz-date header is chosen. |
Authorization | required | Information needed to authenticate requests. |
Prerequisites
The following conditions must be met in order to call this operation.
Only the owner of the bucket or a user having permission can create or replace CORS configuration for the bucket.
BaseUrl used in a host-style request URL should be pre-configured using the ECS Management API or the ECS Portal (for example, emc.com in the URL: bucketname.ns1.emc.com).
Namespace corresponding to this bucket should exist (for example, ns1).
Request Payload
All parameters are required unless otherwise stated.
Field | Description | Type | Notes |
<CORSConfiguration> | |||
<CORSRule> |
0-* Elements |
||
<AllowedMethod> | An HTTP method that the origin is allowed to use. Each CORS rule consists of at least one origin and one method | String |
0-* Elements Valid Values:
|
<AllowedOrigin> | An Origin, from where cross-domain requests are allowed | String |
0-* Elements Valid Values:
|
<AllowedHeader> | Specifies the allowed headers in a pre-flight OPTIONS request via the Access-Control-Request-Headers header. Each header specified in Access-Control-Request-Headers must match an AllowedHeader element | String |
0-* Elements Valid Values:
|
<MaxAgeSeconds> | The amount of time in seconds that a browser can cache a pre-flight response for a specific resource. A rule can contain at most one MaxAgeSeconds element | String |
Valid Values:
|
<ExposeHeader> | A header in the response that a customer can access from their application | String |
0-* Elements |
<ID> | The rule's unique identifier | String |
Valid Values:
|
</CORSRule> | |||
</CORSConfiguration> |
Response Headers
x-amz-request-id | optional | Request id |
x-amz-id-2 | optional | Bucket identifier |
Response Body
Response indicating Success or Failure for this operation