Last active
July 20, 2016 14:16
-
-
Save guiliredu/7f133a984411c370e847842ca8c8d72a to your computer and use it in GitHub Desktop.
Configura CORS in .htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
Header add Access-Control-Allow-Origin: "domain.tld" | |
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT" | |
Header add Access-Control-Allow-Headers: "X-Requested-With, Content-Type" | |
RewriteEngine on | |
RewriteBase / | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some points:
sudo a2enmod headers
and restart apacheMore info in: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS