Skip to content

Instantly share code, notes, and snippets.

@pboethig
Created October 15, 2016 13:05
Show Gist options
  • Save pboethig/95f8cdb3573703bba2464fa2ed894d2f to your computer and use it in GitHub Desktop.
Save pboethig/95f8cdb3573703bba2464fa2ed894d2f to your computer and use it in GitHub Desktop.
# with AJAX withCredentials=false (cookies NOT sent)
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, PATCH, DELETE"
Header always set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type"
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L,E=HTTP_ORIGIN:%{HTTP:ORIGIN}]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment