If you are trying to run two different servers on the same machine and trying to access each other through HTTP request, you might get a CORS error.

Something like this in Firefox:

and this error in Google Chrome:


To solve this – first you need enable module “headers” on the server which is responding.

For Apache you run the following and restart the server:

next add the following to your .htaccess file


 

Enabling CORS in Apache: Solve Cross-Origin Request Blocked error
Tagged on: