Skip to content

Instantly share code, notes, and snippets.

@alrocar
Created September 14, 2016 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alrocar/e4f5fa30b057af7224cc46a2b95aae96 to your computer and use it in GitHub Desktop.
Save alrocar/e4f5fa30b057af7224cc46a2b95aae96 to your computer and use it in GitHub Desktop.
#Add this to your httpd.conf or httpd-vhosts.conf
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment