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

Was this answer helpful?

Related Articles

I need a module installed but I do not have rights

No problem. Send us a trouble ticket and we will install the module as long as there are no...

What are these vt directories?

Those are FrontPage extension directories. If you have and no longer need them you can uninstall...

Installing an SSL Certificate in cPanel

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

Why can users behind proxies not see my site?

If you have enabled hot link protection users behind proxies may not be able to see your site...

Can you write a script for me?

We do not write scripts but will be more than happy to guide you in the right direction. Most the...