Created
July 13, 2012 15:37
-
-
Save maxparm/3105526 to your computer and use it in GitHub Desktop.
.htaccess with appropriate CORS header
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
<IfModule mod_rewrite.c> | |
Header add Access-Control-Allow-Origin "*" | |
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT" | |
Header add Access-Control-Allow-Headers: "Content-Type" | |
RewriteEngine on | |
RewriteBase / | |
</IfModule> |
Shouldn't it be <IfModule mod_headers.c>
rather than mod_rewrite.c
?
Thanks for sharing a great information with us, it really amazing.
For information purpose for others, You can also have a look at this article which allow CORS header.
Legend, thanks 💯
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have a typo:
Header add Access-Control-Allow-Origin "*"
is missing a colon ':' it should be: