Created
February 5, 2015 00:00
-
-
Save iamnewton/201bd5929cc436894faa to your computer and use it in GitHub Desktop.
CORS configuration for allowing fonts across a CDN
This file contains hidden or 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
# http://davidwalsh.name/cdn-fonts | |
# Apache config | |
<FilesMatch ".(eot|ttf|otf|woff)"> | |
Header set Access-Control-Allow-Origin "*" | |
</FilesMatch> | |
# nginx config | |
if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){ | |
add_header Access-Control-Allow-Origin *; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment