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
This commit is contained in:
Alan Orth 2016-11-14 12:28:18 +02:00
parent 36c16e93bb
commit 61919745c8
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -61,7 +61,33 @@ http {
gzip_min_length 860; gzip_min_length 860;
gzip_disable "msie6"; gzip_disable "msie6";
gzip_http_version 1.1; 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; client_max_body_size 12m;