Header set Access-Control-Allow-Origin in .htaccess

email-validation

Add the following code in your .htaccess file,

Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"

Don't forgot to enable apache header module

sudo a2enmod headers
Tags: