summary refs log tree commit diff
path: root/nixos/modules/services/web-servers/nginx
diff options
context:
space:
mode:
authorVincent Bernat <vincent@bernat.ch>2018-08-26 21:48:55 +0200
committerVincent Bernat <vincent@bernat.ch>2018-08-26 21:48:55 +0200
commitbd075eb914ca16ce9f35211445733f72ddaf0127 (patch)
treecc49537685a3f54c452838d8c85080b65ae13a7d /nixos/modules/services/web-servers/nginx
parent06a5fb2adab413ff761a303d5de7914032b08ed2 (diff)
downloadnixlib-bd075eb914ca16ce9f35211445733f72ddaf0127.tar
nixlib-bd075eb914ca16ce9f35211445733f72ddaf0127.tar.gz
nixlib-bd075eb914ca16ce9f35211445733f72ddaf0127.tar.bz2
nixlib-bd075eb914ca16ce9f35211445733f72ddaf0127.tar.lz
nixlib-bd075eb914ca16ce9f35211445733f72ddaf0127.tar.xz
nixlib-bd075eb914ca16ce9f35211445733f72ddaf0127.tar.zst
nixlib-bd075eb914ca16ce9f35211445733f72ddaf0127.zip
nginx: add more gzipped MIME types
The additions are:

 - image/svg+xml for SVG images
 - application/atom+xml for Atom feeds

These types are also present in mime.types. For better readability,
the list is sorted and formatted with one type per line.
Diffstat (limited to 'nixos/modules/services/web-servers/nginx')
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 4359b3f8b6f2..17b169f7c696 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -93,7 +93,17 @@ let
         gzip_disable "msie6";
         gzip_proxied any;
         gzip_comp_level 5;
-        gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
+        gzip_types
+          application/atom+xml
+          application/javascript
+          application/json
+          application/xml
+          application/xml+rss
+          image/svg+xml
+          text/css
+          text/javascript
+          text/plain
+          text/xml;
         gzip_vary on;
       ''}