Skip to content

Instantly share code, notes, and snippets.

@sergioska
Created September 13, 2018 14:07
Show Gist options
  • Save sergioska/077d34c94314882e4c515a8f96142cb4 to your computer and use it in GitHub Desktop.
Save sergioska/077d34c94314882e4c515a8f96142cb4 to your computer and use it in GitHub Desktop.
CORS Apache Configuration
<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