Description
If an Alibaba Cloud Object Storage Service (OSS) bucket is configured with Alibaba Cloud Content Delivery Network acceleration or the IMG feature is enabled, the CORS configured on OSS may become invalid.
Cause
The reasons for the failure of CORS configured in OSS due to Alibaba Cloud Content Delivery Network acceleration are as follows:
Alibaba Cloud Content Delivery Network acceleration is achieved by caching a file on a node, which is directly returned to the user by the node. During the period when the file has been cached and has not expired, even if the file is changed on the origin site, the user accesses the content that was previously cached on the node, rather than the updated content, unless the Alibaba Cloud Content Delivery Network performs a cache refresh operation.
If the Alibaba Cloud Content Delivery Network acceleration feature is enabled or the image processing feature is enabled, the files that have been accessed on Alibaba Cloud Content Delivery Network nodes are cached. In this case, if the CORS configuration is configured or changed, Alibaba Cloud Content Delivery Network the cached content is not automatically synchronized to the configuration update, resulting in CORS not taking effect.
Solution
We recommend that you change the CORS configuration and refresh the URL cache in the Alibaba Cloud Content Delivery Network console so that the CORS configuration can take effect in a timely manner.
Log on to the CDN console.
Choose Refresh and Preload > Refresh Cache, enter the URL to be refreshed, and click Refresh.
Make sure that the HTTP header parameters are correctly configured. For more information, see Alibaba Cloud Content Delivery Network How to Configure cross-origin resource sharing (CORS) and Precautions.
Applicable scope
CDN
Object Storage Service