Created
February 17, 2019 08:41
-
-
Save negarjf/95f2c2c6b27d9ad3591bb5f1f36059dc to your computer and use it in GitHub Desktop.
.htaccess config for local cross origin problem
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
# .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] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the method, I find a solution when I start to get tired of research :)