When CDN acceleration is configured for the Bucket of the OSS or the image service function is enabled, the CORS configuration on the OSS may fail.
Cause of problem
CDN implements acceleration by caching files on nodes and directly returning the files to clients from the nodes. However, even if a file is changed on the origin, users will still be able to access the file previously cached on the node rather than the file after the update, unless a cache refresh operation is performed on the CDN.
After CDN acceleration or the image processing feature is enabled, all files already accessed are cached on the CDN node. If CORS settings are configured or changed, CDN cached content is not automatically synchronized with the configuration update, causing CORS to not take effect.
After you modify the CORS settings, we recommend that you refresh the cache for the relevant URLs in the CDN console for the CORS settings to take effect.
Note: For the cache refresh API, see refresh the cache.
- Log on to the CDN console.
- Select refresh and prefetch > refresh the cache to fill in the URL that you want to refresh, click refresh.
- Check whether the HTTP header parameters are correctly configured. For more information, see configure Cross-Origin Resource Sharing (CORS) for CDN and precautions.