Skip to content

CORS on other S3-compatible providers

Any storage that speaks the S3 API supports the same CORS configuration shape. If your provider isn’t covered by a dedicated page in this section yet, this generic recipe should still work.

[
{
"AllowedOrigins": [
"https://studio.relyn.app",
"http://localhost:5173"
],
"AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"],
"AllowedHeaders": ["*"],
"ExposeHeaders": ["ETag"],
"MaxAgeSeconds": 3600
}
]

Replace https://studio.relyn.app with your studio URL if you self-host Relyn. Drop the localhost line if you don’t develop Relyn locally.

Each provider exposes this a little differently. Look for one of:

  1. A bucket settings tab in the provider’s dashboard with a “CORS Policy”, “CORS Configuration”, or “Cross-Origin” section. Paste the JSON there.

  2. An S3-compatible CLI. Most providers respond to:

    Terminal window
    aws s3api put-bucket-cors \
    --endpoint-url https://YOUR-PROVIDER-ENDPOINT \
    --bucket YOUR_BUCKET \
    --cors-configuration '{ "CORSRules": [ ... ] }'

    The body wraps the rules in {"CORSRules": [...]} — same content, slightly different shape.

  3. An API call. The S3 PUT Bucket CORS operation:

    PUT /?cors HTTP/1.1
    Host: your-provider-endpoint
    Content-MD5: ...
    Authorization: AWS4-HMAC-SHA256 ...
    Content-Type: application/xml
    <CORSConfiguration>
    <CORSRule>
    <AllowedOrigin>https://studio.relyn.app</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>DELETE</AllowedMethod>
    <AllowedHeader>*</AllowedHeader>
    <ExposeHeader>ETag</ExposeHeader>
    <MaxAgeSeconds>3600</MaxAgeSeconds>
    </CORSRule>
    </CORSConfiguration>

In Relyn, open the bucket and click Diagnose. Relyn runs an OPTIONS preflight against your bucket endpoint and confirms the policy works.

If you’re setting Relyn up on a provider that isn’t yet listed in this section and you’d like a dedicated page (with their exact dashboard steps), drop a note to hello@relyn.app — we add guides based on what real users connect.