Created
November 20, 2014 12:22
-
-
Save esedic/747d1b33d64d5cb64f73 to your computer and use it in GitHub Desktop.
Cross-Origin Resource Sharing policy override with .htaccess
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
## Situation: you want to load web font or other asset from subdomain | |
# Because of the cross origin access policy, you get an error | |
# Put this is in .htaccess file inside your root folder and this limitation will be gone | |
## | |
Header add Access-Control-Allow-Origin "*" | |
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type" | |
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment