S3 Put Bucket CORS
    • Dark
      Light

    S3 Put Bucket CORS

    • Dark
      Light

    Article Summary

    GEThttps://s3.<your-region>.backblazeb2.com/<your-bucket-name>/?cors

    Sets the bucket's CORS configuration. If the configuration exists, it is replaced.

    AUTHORIZATION AWS Signature

    This request is using AWS Signature from collection Backblaze B2 Cloud Storage S3 Compatible API.

    PARAMS

    cors

    Must be present to put bucket CORS configuration

    PATH VARIABLES

    bucket

    Required. The name of the bucket

    Example Request

    curl --location --request PUT 'https://s3.<your-region>.backblazeb2.com/my-bucket-name/?cors=null' \
    --data '<CORSConfiguration>
        <CORSRule>
            <ID>Allow GET/POST from Example site</ID>
            <AllowedOrigin>https://www.example.com</AllowedOrigin>
            <AllowedMethod>GET</AllowedMethod>
            <AllowedMethod>POST</AllowedMethod>
            <AllowedHeader>*</AllowedHeader>
            <MaxAgeSeconds>3600</MaxAgeSeconds>
            <ExposeHeader>x-amz-server-side-encryption</ExposeHeader>
        </CORSRule>
    </CORSConfiguration>'

    Example Response

    200 OK

    Body

    No response body

    This request doesn't return any response body


    Headers (8)

    x-amz-request-id699c79d678ac85eb

    x-amz-id-2

    aMb41pGbJOWYzrTUIY0JmFjSgZMljS2L4

    Cache-Control

    max-age=0, no-cache, no-store

    Content-Type


    Content-Length

    0

    Date

    Fri, 28 Jan 2022 22:46:26 GMT

    Keep-Alive

    timeout=5

    Connection

    keep-alive







    Was this article helpful?