Skip to content

Instantly share code, notes, and snippets.

@vitalbh
Last active February 8, 2016 14:24
Show Gist options
  • Save vitalbh/8316569 to your computer and use it in GitHub Desktop.
Save vitalbh/8316569 to your computer and use it in GitHub Desktop.
Fonts - mime types, gzip and font-face crossdomain bug on firefox
/etc/nginx/mime.types
remove eot (defaults to application/octet-stream).
font/ttf ttf;
font/opentype otf;
application/font-woff woff;
application/vnd.ms-fontobject eot;
on nginx config
*You can gzip all font formats except woff (which is already compressed)*
gzip_types [...] font/ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
# Fix @font-face cross-domain restriction in Firefox
location ~* \.(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