CORS in Cloud CDN
Written by
Updated at January 11, 2024
Yandex Cloud CDN supports CORS requests
In the resource settings, you can:
- Allow CORS requests with any origins (the
Origin
header values): Select for theAccess-Control-Allow-Origin
header, the*
value or use the same value as in theOrigin
header in the request. - Allow CORS requests for specific origins: Select for the
Access-Control-Allow-Origin
header the same value as in theOrigin
header in the request, but only if it's listed as allowed in the settings. - Prohibit CORS requests: Disable adding the
Access-Control-Allow-Origin
header to the responses.
CORS settings apply to all files of the resource.
Note
To make sure cross-domain requests work correctly, additionally set up CORS on a source if the source supports this mechanism. For example, CORS configuration is required for Object Storage buckets.