Skip to content

Instantly share code, notes, and snippets.

@iamnewton
Created February 5, 2015 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamnewton/201bd5929cc436894faa to your computer and use it in GitHub Desktop.
Save iamnewton/201bd5929cc436894faa to your computer and use it in GitHub Desktop.
CORS configuration for allowing fonts across a CDN
# 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