edit-icon download-icon

Alibaba Cloud CDN acceleration invalidates CORS configuration

Last Updated: Dec 01, 2017

When Alibaba Cloud CDN acceleration or the image process service (Alibaba Cloud CDN acceleration is enabled by default) is enabled for the OSS bucket, CORS on the OSS may be invalidated.

The reason is as follows:

Alibaba Cloud CDN acceleration is implemented by caching a file on the Alibaba Cloud CDN node that will then directly return the file to users. Before the expiry of the cache duration, even if the file has been changed on the origin site, the file accessed by users is still the file cached on the node, unless the cache is refreshed on the Alibaba Cloud CDN node.

Therefore, after Alibaba Cloud CDN acceleration or the image process service (Alibaba Cloud CDN acceleration is enabled by default) is enabled, all files already accessed are cached on the Alibaba Cloud CDN node. If CORS is configured or changed, the content already cached on the Alibaba Cloud CDN node is not automatically updated and thus the CORS configuration does not take effect.

Solution:

It is recommended that you refresh the cache on the Alibaba Cloud CDN console after changing the CORS configuration, so that the CORS configuration takes effect immediately.

22

For details about cache refresh API, refer to RefreshObjectCaches.

If the problem persists, contact Alibaba Cloud After-Sales Technical Support.

Thank you! We've received your feedback.