Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Object Storage
  • Pricing policy
  • Terraform reference
    • API authentication
      • How to use the API
      • Signing requests
      • Getting started with the S3 API
        • All services and methods
          • All methods
          • XML structure of CORS configuration
          • PutBucketCors
          • GetBucketCors
          • DeleteBucketCors
        • Common request headers
        • Common response headers
        • Responses
  • Monitoring metrics
  • Audit Trails events
  • Bucket logs
  • Release notes
  • FAQ

In this article:

  • Elements
  • Example
  1. API reference
  2. AWS S3 REST
  3. REST
  4. CORS
  5. XML structure of CORS configuration

CORS configuration for buckets

Written by
Yandex Cloud
Updated at August 20, 2026
View in Markdown
  • Elements
  • Example

Object Storage allows you to manage bucket CORS configurations. To upload a CORS configuration to Object Storage, you need to create an XML document as described in this section. You can get a document in this format by downloading an existing configuration.

The general configuration format is as follows:

<CORSConfiguration>
    <CORSRule>
        <AllowedOrigin>URL</AllowedOrigin>
        <AllowedMethod>HTTP_Method</AllowedMethod>
        <AllowedHeader>Header_Name</AllowedHeader>
        ...
    </CORSRule>
    ...
</CORSConfiguration>

A configuration may contain up to 100 rules.

ElementsElements

Element

Description

CORSConfiguration

Root element of a CORS configuration. It cannot contain more than 100 CORSRule elements.

Path: /CORSConfiguration.

CORSRule

Rule for filtering incoming requests to the resource. Each rule must contain at least one AllowedMethod and AllowedOrigin element.

Path: /CORSConfiguration/CORSRule.

ID

Unique rule ID (maximum 255 characters).

It is optional. You can use it to search for a rule in a file.

Path: /CORSConfiguration/CORSRule/ID.

AllowedMethod

HTTP method (PUT, GET, HEAD, POST, or DELETE) that can be used in a cross-domain request. Each method should be specified in a separate element. Specify at least one method.

Path: /CORSConfiguration/CORSRule/AllowedMethod.

AllowedOrigin

Website that allows sending CORS requests to the bucket. Specify at least one AllowedOrigin element.

It may contain only one * character. Examples: http://*.example.com, *.

Path: /CORSConfiguration/CORSRule/AllowedOrigin.

AllowedHeader

Header allowed in a request to an object. If multiple headers are allowed, specify each one in a separate AllowedHeader element. You can use a single * character in the header name to define a template, e.g., <AllowedHeader>*</AllowedHeader> means that all headers are allowed.

The options request contains the Access-Control-Request-Headers header. Object Storage maps the headers provided in Access-Control-Request-Headers with the AllowedHeader element value and responds to options with a list of allowed headers.

Path: /CORSConfiguration/CORSRule/AllowedHeader.

MaxAgeSeconds

Time, in seconds, for the browser to cache the result of request to an object using the options method.

Path: /CORSConfiguration/CORSRule/MaxAgeSeconds.

ExposeHeader

Header that can be exposed to browser JavaScript apps. If multiple headers are allowed, specify each of them in a separate element.

When sending a request to an object, the JavaScript client can only use the headers specified in the ExposeHeader elements.

Path: /CORSConfiguration/CORSRule/ExposeHeader.

ExampleExample

The following configuration allows you to send CORS requests from the http://www.example.com website using the PUT, POST, and DELETE methods without any header restrictions.

<CORSConfiguration>
    <CORSRule>
        <AllowedOrigin>http://www.example.com</AllowedOrigin>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

Related articlesRelated articles

  • CORS in Object Storage

  • Configuring CORS

Useful linksUseful links

  • Getting started with the AWS S3 API in Yandex Object Storage

  • Debugging requests using the AWS CLI

  • Example of sending a signed request using curl

  • Code example for generating a signature

Was the article helpful?

Previous
All methods
Next
PutBucketCors
© 2026 Direct Cursus Technology L.L.C.