GET
/
storage
/
provisioning
/
v1
/
storage
/
{storage_id}
/
s3
/
bucket
/
{bucket_name}
/
cors
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
bucket_cors = client.storage.buckets.cors.get(
    bucket_name="bucket_name",
    storage_id=0,
)
print(bucket_cors.allowed_origins)
{
  "allowedOrigins": [
    "https://example.com",
    "https://app.example.com",
    "*"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

storage_id
integer
required

Unique identifier for the storage instance

bucket_name
string
required

Name of the S3 bucket to retrieve CORS configuration from

Response

StorageGetBucketCorsEndpointRes

StorageGetBucketCorsEndpointRes output

allowedOrigins
string[]

List of allowed origins for Cross-Origin Resource Sharing (CORS) requests. Contains domains/URLs that are permitted to make cross-origin requests to this bucket.

Example:
[
"https://example.com",
"https://app.example.com",
"*"
]