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

How can I tell how much disk space I have available?

To see how much disk space you have available, go to your control panel and on the left side of...

osCommerce password reset

How to reset your osCommerce admin login... You can reset your osCommerce administrative login...

Reseller: Unable to find an IP address in when creating an account

When creating accounts be sure to select a package in the package field. You can create a package...

Do you support TeamSpeak?

We do not support Teamspeak on our servers but allow you to create a subdomain such as...

htaccess referral redirect

It is often useful to redirect a visitor to a page based on the referring website. There are...