--- title: "PutBucketCors" slug: "ncloudstorage-putbucketcors" updated: 2026-09-17T10:12:30Z published: 2026-09-17T10:12:30Z canonical: "api.ncloud-docs.com/ncloudstorage-putbucketcors" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # PutBucketCors Available in Classic and VPC Register Cross-Origin Resource Sharing (CORS) settings for an Ncloud Storage bucket or overwrite existing settings. ## Request This section describes the request format. The method and URI are as follows: | Method | URI | | --- | --- | | PUT | - | ### Request headers The following describes the request headers. Note For information about the headers common to all Ncloud Storage APIs, see [Ncloud Storage request headers](/docs/en/storage-ncloudstorage#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94). | Field | Required | Description | | --- | --- | --- | | `Content-MD5` | Conditional | Base64-encoded 128-bit MD5 hash of the request body - Used to verify the integrity of the request body. - Required if `x-amz-checksum-*` is not entered. | | `x-amz-checksum-*` | Conditional | Checksum hash value - Enter the used algorithm in `*` of the key. - Supported algorithms: `crc32` \| `crc32c` \| `sha1` \| `sha256` \| `crc64nvme` - Required if `Content-MD5` is not entered. | ### Request body You can include the following data in the body of your request: | Field | Type | Required | Description | | --- | --- | --- | --- | | `CORSConfiguration` | - | Required | Root elements of CORS configuration | | `CORSConfiguration.CORSRule` | List | Required | CORS rule list - Up to 100 can be entered. | | `CORSConfiguration.CORSRule.ID` | String | Optional | Rule name - Up to 255 characters can be entered. - Unique value within the rule - Automatically generated if omitted | | `CORSConfiguration.CORSRule.AllowedMethod` | List | Required | HTTP method to allow - Specify one or more among `GET`, `PUT`, `POST`, `DELETE`, `HEAD`. | | `CORSConfiguration.CORSRule.AllowedOrigin` | List | Required | Origin to allow - Wildcards (`*`) can be used, and only one is allowed per origin. | | `CORSConfiguration.CORSRule.AllowedHeader` | List | Optional | Request header to allow - Wildcards (`*`) can be used, and only one is allowed per header. | | `CORSConfiguration.CORSRule.ExposeHeader` | List | Optional | Response header to display to the browser - Wildcards (`*`) can't be used. | | `CORSConfiguration.CORSRule.MaxAgeSeconds` | Integer | Optional | Time the browser caches the preflight response (second) | Note - If `CORSRule` is missing, or if `AllowedMethod` or `AllowedOrigin` is omitted, an error is returned. - Only one wildcard (`*`) is allowed per entry in `AllowedOrigin` and `AllowedHeader`. - Wildcards (`*`) cannot be used in `ExposeHeader`. - An error is returned if `CORSRule.ID` is duplicated. ### Request example The request example is as follows: ``` PUT /?cors HTTP/1.1 Host: bucket.kr.ncloudstorage.com Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ== rule1 GET PUT https://example.com * x-amz-server-side-encryption 3600 ``` ## Response This section describes the response format. ### Response headers For information about the headers common to all Ncloud Storage APIs, see [Ncloud Storage response headers](/docs/en/storage-ncloudstorage#%EC%9D%91%EB%8B%B5%ED%97%A4%EB%8D%94). ### Response status codes For information about the HTTP status codes common to all Ncloud Storage APIs, see [Common Ncloud Storage response status codes](/docs/en/storage-ncloudstorage#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C). ### Response example The response example is as follows: ``` HTTP/1.1 200 OK ```