Dynamic Route for CDN (DCDN) supports whitelist configurations for cross-origin resource sharing (CORS). This topic describes how to configure CORS for DCDN and the relevant notes.
- Log on to the DCDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the domain name that you want to manage and click Configure.
- In the left-side navigation pane of the page that appears, click Caching.
- Click the HTTP Header tab.
- On the HTTP Header tab, click Add.
- In the HTTP Header Setting dialog box that appears, select
Access-Control-Allow-Originfrom the Parameter drop-down list, specify the Value field based on the actual environment, and then click OK. Repeat the same steps to add the
When you configure CORS whitelists, pay attention to the following notes:
- Wildcard domain names are not supported, such as *.12345.com. You must specify the exact domain names.
- Only one domain name can be configured in a whitelist for an account.
- If the origin server uses an OSS domain name and CORS is configured in the OSS and DCDN consoles, the CORS settings in DCDN overwrite the settings in OSS.