Bucket CORS
S3-style CORS configuration. See Core Concepts → CORS for the type signature.
| RPC | HTTP |
|---|---|
PutBucketCors | PUT /admin/buckets/:name/cors |
GetBucketCors | GET /admin/buckets/:name/cors |
DeleteBucketCors | DELETE /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
HTTP
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
HTTP
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
HTTP
curl -sS -X DELETE "https://k3.dev.dodil.io/admin/buckets/kb-prod/cors" \
-H "Authorization: Bearer $DODIL_TOKEN"Response
Empty (DeleteBucketCorsResponse {}).
See also
- Core Concepts → CORS — type signature
- Buckets · Policy · Objects
- Conventions — auth, headers, error envelope
grpcurlreference — full flag set + reflection-disabled fallbacks