Created
September 13, 2018 14:07
-
-
Save sergioska/077d34c94314882e4c515a8f96142cb4 to your computer and use it in GitHub Desktop.
CORS Apache Configuration
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
<VirtualHost *:80> | |
# add this in apache virtualhost configuration file to avoid CORS problem enabling request from multiple origin | |
# (optionally change LocationMatch path) | |
<LocationMatch "/"> | |
Header set Access-Control-Allow-Origin "*" | |
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" | |
Header set Access-Control-Max-Age "1000" | |
Header set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" | |
</LocationMatch> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment