From f9b58cd883edc93d138d7ec38b6d4d173d731ef2 Mon Sep 17 00:00:00 2001 From: Przemek Matylla Date: Wed, 3 Sep 2014 15:28:54 +0300 Subject: [PATCH] Add configs for WOFF 2.0 font files (`.woff2`) Ref: http://www.w3.org/TR/WOFF2/ h5bp/server-configs-apache#32 Close: h5bp/server-configs-nginx#54 --- h5bp/location/cross-domain-fonts.conf | 2 +- h5bp/location/expires.conf | 2 +- mime.types | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/h5bp/location/cross-domain-fonts.conf b/h5bp/location/cross-domain-fonts.conf index 93d7384f..9e6df0c4 100644 --- a/h5bp/location/cross-domain-fonts.conf +++ b/h5bp/location/cross-domain-fonts.conf @@ -1,5 +1,5 @@ # Cross domain webfont access -location ~* \.(?:ttf|ttc|otf|eot|woff)$ { +location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { include h5bp/directive-only/cross-domain-insecure.conf; # Also, set cache rules for webfonts. diff --git a/h5bp/location/expires.conf b/h5bp/location/expires.conf index 5168a870..b7b00445 100644 --- a/h5bp/location/expires.conf +++ b/h5bp/location/expires.conf @@ -36,7 +36,7 @@ location ~* \.(?:css|js)$ { # WebFonts # If you are NOT using cross-domain-fonts.conf, uncomment the following directive -# location ~* \.(?:ttf|ttc|otf|eot|woff)$ { +# location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { # expires 1M; # access_log off; # add_header Cache-Control "public"; diff --git a/mime.types b/mime.types index f0d2499e..94c31f13 100644 --- a/mime.types +++ b/mime.types @@ -53,6 +53,7 @@ types { # Web fonts application/font-woff woff; + application/font-woff2 woff2; application/vnd.ms-fontobject eot; application/x-font-ttf ttc ttf; font/opentype otf;