jQuery error Access-Control-Allow-Origin when sending post request

We encountered weird error when we are requesting to another domain. Actually it is the same domain but on a sub domain.

Here was the error I encountered

error-oregano
I went to my .htaccess and I add this line of code.

Header add Access-Control-Allow-Origin http://www.domain.com

This will specify the domain you want to allow for security purposes and solve my issue.

Leave a Reply

Your email address will not be published. Required fields are marked *