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>
  • 125 Users Found This Useful

Was this answer helpful?

Related Articles

Howto: Add another website to your account

You can add another website to your hosting account if your hosting plan allows for more than one...

Adding a Facebook Button

Facebook has a wonderful page on adding a Facebook image to your website complete with...

How can I make search engine friendly urls with my app?

The best source is the support forums for the particular app. You can also check the following...

I updated my site but I still see old pages

Make sure your files are indeed updated by checking the file time stamps. Also, you may want to...