cnmoro
5/22/2019 - 8:30 PM

CORS - Apache

CORS - Apache

Change in /etc/apache2/apache2.conf

<Directory /var/www/*>
     Order Allow,Deny
     Allow from all
     AllowOverride all
     Header set Access-Control-Allow-Origin "*"
</Directory>
Add/activate module

 a2enmod headers 
Restart service

/etc/init.t/apache2 restart

--
Fonte: https://stackoverflow.com/questions/29150384/how-to-allow-cross-domain-request-in-apache2