Error message: Access to XMLHttpRequest at ... has been blocked by CORS policy

|

Table of Contents

Problem

The following message appears in your browser's console:

Access to XMLHttpRequest at 'https://www.deine-domain.local/wp-content/uploads/borlabs-cookie/vendor-list.json' from origin 'https://www.eine-andere-domain.local' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Cause

The domain of your website is not the same as the domain from which the Borlabs Cookie data is being loaded. This can occur if a multilingual website is not configured correctly or when a CDN is being used.

Solution

You must ensure that all Borlabs Cookie data is loaded from the same domain as your website, or configure your server to allow files to be loaded from a different domain.

For more information, please refer to:
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin.

Changes to the Access-Control-Allow-Origin header should only be made by experienced users.

Was this article helpful?

Helpful
Not helpful

Couldn't find the answer you were looking for? We're happy to help.