Home
/
Advanced Site Tools
/
Other
/
Cross-origin resource sharing (CORS)

Cross-origin resource sharing (CORS)

In cases where cross-domain scripting is needed, add the following rule in your website’s .htaccess file:

<ifModule mod_headers.c>
Header set Access-Control-Allow-Origin: *
</ifModule>

This header will instruct web browsers on how to use and manage the cross-domain content. The browser then allows access to the content based on its security configuration.

N.B. The above rules will only work if NGINX Direct Delivery is disabled. You can deactivate the service from Site Tools -> Speed -> Caching.

Share This Article