Help Center> Content Delivery Network> Troubleshooting> What Do I Do If the Browser Displays a Message Indicating that a Cross-domain Exception Occurs After CDN Is Enabled?
Updated on 2023-11-08 GMT+08:00

What Do I Do If the Browser Displays a Message Indicating that a Cross-domain Exception Occurs After CDN Is Enabled?

Symptom

The page is abnormal when a client accesses resources. The following figure shows the error information.

Possible Causes and Countermeasures

Some resources in the cross-domain request do not respond to the header Access-Control-Allow-Origin. In this case, configure the response header information on CDN. For details, see HTTP Header Settings (Cross-origin Requests).

  • To prevent cross-domain errors caused by browser cache, clear browser cache after configuring Access-Control-Allow-Origin.
  • If your domain name is an OBS bucket and CORS rules are configured on CDN, you also need to configure CORS on OBS.