Knowledge base

Put Bucket CORS

Sets Cross-Origin Resource Sharing (CORS) configuration on the bucket. The user must be the bucket owner or to have been granted s3:PutBucketCORS permission on the bucket.

PUT /?cors HTTP/1.1
Host: {bucket}.{region}.cdn77-storage.com

Request Entries

NameDescription
CORSConfigurationnone

A container for the request.

CORSRulenone

A container for the CORS information

AllowedHeaderstring

Headers that are specified in the Access-Control-Request-Headers header

AllowedMethodstring

An HTTP method that you allow the origin. GET, PUT, HEAD, POST, and DELETE

AllowedOriginstring

One or more origins you want customers to be able to access the bucket from.

Example

<CORSConfiguration>
    <CORSRule>
        <AllowedOrigin>http://example.com</AllowedOrigin>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
<CORSConfiguration>

Updated on 10th September, 2024

Can’t find what you are looking for?