Cross Origin Request Error

When receiving a cross-origin / cross original request, CORS header 'Access-Control-Allow-Origin' does not match, or same origin disallow policy error you may need to add an http header to allow the request. The following two examples work in cases regarding Apache and may be used by adding one set to the .htaccess file:

 

<FilesMatch ".(js|css|xml|gz|html|eot|ttd|otf|woff)$">
Header add Access-Control-Allow-Origin "*"
</FilesMatch>

 

<IfModule mod_headers.c>
Header add Access-Control-Allow-Origin "*"
</IfModule>
  • 129 Users Found This Useful

Was this answer helpful?

Related Articles

Installing an SSL Certificate in cPanel

To start, the website requires a dedicated IP. If you do not have one, you may order the...

Error 401 Unauthorized

This can occur when a web page requires authorization or a login to view the contents. If none...

Set CORS header to Allow Access for any Incoming Domain

The following may be used to set to always set the CORS header for any incoming domains without...

Why can I not ping my domain?

For security purposes we have closed off the ICMP port which is used for ping.

How do I submit my site to search engines?

Submit your website to popular search engines to increase your webite's exposure and visitor...