Cloudflare R2 Storage icon

Cloudflare R2 Storage

Interact with Cloudflare R2 object storage. Upload, download, manage files and buckets. Supports batch operations, multipart uploads, and can be used as a tool by AI Agents.

Bucket → Get CORS

AI-generated

Summary

Fetch the CORS configuration for a specified R2 bucket.

Inputs

  • bucketName (required) — The name of the bucket whose CORS configuration is to be retrieved.

Output shape

object containing the CORS configuration

Returns a JSON object with a corsConfiguration field holding an array of CORS rules. The response may include additional metadata but only the CORS rules are guaranteed.

Examples

Example 1: Inspect the current CORS settings of a bucket

Provide the bucketName; the operation returns the existing CORS configuration which can be referenced or modified.

Discussion