After Alibaba Cloud CDN acceleration is enabled for a website, if a non-cross-origin access first occurs on an Alibaba Cloud CDN node, the file content without the CORS header will be cached in the Alibaba Cloud CDN. An access error is prompted for all cross-origin accesses before expiration because the CORS header information is absent. Such a problem can be avoided by setting the CORS header information using the user-defined headers of Alibaba Cloud CDN.
- Log on to the Alibaba Cloud CDN console, and find Set HTTP Header:
- Set the header Access-Control-Allow-Origin, Access-Control-Allow-Methods and Access-Control-Max-Age based on your requirements:
View the configured CORS header information.
Note: The CORS header information set on the Alibaba Cloud CDN console is valid for the Alibaba Cloud CDN domain name, and the header information set on the origin site will be overwritten.
If the problem persists, contact Alibaba Cloud After-Sales Technical Support.