Serving @font-face icon font across domains
Turns out if you want to serve font files across domains that a header adjustment needs to be set on the domain which is hosting the font. For example, I have an icon font hosted at mydomain.com but I want to display the font on anotherdomain.com. Some browsers don't like this UNLESS you explicitly set a header for the hosting domain. Crack open the .htaccess file on the hosting domain and add this little snippet...
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
Yay! Now go eat a crumpet and enjoy being awesome...
Written by Nate Arnold
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#