Skip to Content
We are live but in Staging 🎉

Bucket CORS

S3-style CORS configuration. See Core Concepts → CORS for the type signature.

RPCHTTP
PutBucketCorsPUT /admin/buckets/:name/cors
GetBucketCorsGET /admin/buckets/:name/cors
DeleteBucketCorsDELETE /admin/buckets/:name/cors

gRPC setup — grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.

PutBucketCors

The HTTP body is the BucketCorsConfiguration value (proto body: "cors_configuration").

Request

curl -sS -X PUT "https://k3.dev.dodil.io/admin/buckets/kb-prod/cors" \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "corsRules": [ { "allowedOrigins": ["https://app.example.com"], "allowedMethods": ["GET", "PUT"], "allowedHeaders": ["*"], "exposeHeaders": ["ETag"], "maxAgeSeconds": 3600 } ] }'

Response

A BucketCorsConfiguration — see Core Concepts → CORS.

GetBucketCors

Request

curl -sS "https://k3.dev.dodil.io/admin/buckets/kb-prod/cors" \ -H "Authorization: Bearer $DODIL_TOKEN"

Response

A BucketCorsConfiguration — see Core Concepts → CORS.

DeleteBucketCors

Request

curl -sS -X DELETE "https://k3.dev.dodil.io/admin/buckets/kb-prod/cors" \ -H "Authorization: Bearer $DODIL_TOKEN"

Response

Empty (DeleteBucketCorsResponse {}).


See also