From 61919745c8722dff0b2d0d240298779e5a90fc7b Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 14 Nov 2016 12:28:18 +0200 Subject: [PATCH] roles/nginx: Update gzip compression types Latest from the HTML 5 Boilerplate project, see: https://github.com/h5bp/server-configs-nginx/blob/master/nginx.conf --- roles/nginx/files/nginx.conf | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/roles/nginx/files/nginx.conf b/roles/nginx/files/nginx.conf index f7aea83..2e3b93d 100644 --- a/roles/nginx/files/nginx.conf +++ b/roles/nginx/files/nginx.conf @@ -61,7 +61,33 @@ http { gzip_min_length 860; gzip_disable "msie6"; gzip_http_version 1.1; - gzip_types text/plain text/css text/xml application/rss+xml application/javascript image/svg+xml; + # Compress all output labeled with one of the following MIME-types. + gzip_types + application/atom+xml + application/javascript + application/json + application/ld+json + application/manifest+json + application/rss+xml + application/vnd.geo+json + application/vnd.ms-fontobject + application/x-font-ttf + application/x-web-app-manifest+json + application/xhtml+xml + application/xml + font/opentype + image/bmp + image/svg+xml + image/x-icon + text/cache-manifest + text/css + text/plain + text/vcard + text/vnd.rim.location.xloc + text/vtt + text/x-component + text/x-cross-domain-policy; + # text/html is always compressed by gzip module client_max_body_size 12m;