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

What is this Code 304 appearing in my stats?

304 is typically sent as a header if a visitor re-requests a document and the document has not...

Enable Mod Rewrite

Create an .htaccess file with the following contents and upload it to your public_html directory....

Creating and Submitting a Google Sitemap

Creating a Google sitemap can be easy and beneficial. By using one, you are pushing a full list...

Do you support TeamSpeak?

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

How can I change the default page / document?

Create a .htaccess file, include the below information into it and upload it to the public_html...