Skip to content

Instantly share code, notes, and snippets.

@negarjf
Created February 17, 2019 08:41
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save negarjf/95f2c2c6b27d9ad3591bb5f1f36059dc to your computer and use it in GitHub Desktop.
Save negarjf/95f2c2c6b27d9ad3591bb5f1f36059dc to your computer and use it in GitHub Desktop.
.htaccess config for local cross origin problem
# .htaccess config for local cross origin problem
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, cache-control"
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
@SerhatUcek
Copy link

Thanks for the method, I find a solution when I start to get tired of research :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment