Last active
February 8, 2016 14:24
-
-
Save vitalbh/8316569 to your computer and use it in GitHub Desktop.
Fonts - mime types, gzip and font-face crossdomain bug on firefox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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