Skip to content
Start here

CORS

Get Bucket CORS Policy
client.R2.Buckets.CORS.Get(ctx, bucketName, params) (*BucketCORSGetResponse, error)
GET/accounts/{account_id}/r2/buckets/{bucket_name}/cors
Put Bucket CORS Policy
client.R2.Buckets.CORS.Update(ctx, bucketName, params) (*BucketCORSUpdateResponse, error)
PUT/accounts/{account_id}/r2/buckets/{bucket_name}/cors
Delete Bucket CORS Policy
client.R2.Buckets.CORS.Delete(ctx, bucketName, params) (*BucketCORSDeleteResponse, error)
DELETE/accounts/{account_id}/r2/buckets/{bucket_name}/cors