Skip to content

Instantly share code, notes, and snippets.

@verticalgrain
Last active February 16, 2017 20:41
Show Gist options
  • Save verticalgrain/283382186de71db3ed093541ba8971f3 to your computer and use it in GitHub Desktop.
Save verticalgrain/283382186de71db3ed093541ba8971f3 to your computer and use it in GitHub Desktop.
Fix CORS policy access errors when accessing fonts on a different domain
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
Header add Access-Control-Allow-Origin "your-domain.com"
## To test access-control-allow-headers in terminal:
## curl -I https://some.cdn.otherdomain.net/media/fonts/somefont.ttf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment