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

Is it possible to make a cron to backup my database at specific times?

Yes, this can be very useful for forum/message board sites with large databases. In your control...

Why can I not ping my domain?

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

Show longer file names in directory/folder index

If you've ever wanted to show longer file names in your directory listing just create or edit an...

I can not get the transfer authorization email can it be forwarded to a different email address?

The authorization has to be authorized by the registered contact for the domain. We cannot change...

Domain Slamming - Beware

There are several companies out there using a predatory practice of attempting to have you renew...