Skip to content

Instantly share code, notes, and snippets.

@ryanlindsey
Created February 29, 2012 18:53
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 ryanlindsey/1943509 to your computer and use it in GitHub Desktop.
Save ryanlindsey/1943509 to your computer and use it in GitHub Desktop.
Apache config for cross-domain fonts
Edit: /etc/apache2/apache2.conf
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
<FilesMatch "\.(ttf|otf|eot)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
Note:
The headers module might also need to be loaded in Apache
$ sudo a2enmod headers
$ sudo /etc/init.d/apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment