diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2023-01-31 20:41:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 20:41:59 +0100 |
commit | 600adcfdcc0c177cd69207ce1e05a9c37107da59 (patch) | |
tree | f4262a144cdc3f772d6fb72c8de80a36ba44ff68 /nixos/modules/services/web-servers/nginx/default.nix | |
parent | ba0f7ba3c1ad28ed6d0f75d485e874de8974c4ce (diff) | |
parent | d178a1d7a13696376d9439b04571983551221d13 (diff) | |
download | nixlib-600adcfdcc0c177cd69207ce1e05a9c37107da59.tar nixlib-600adcfdcc0c177cd69207ce1e05a9c37107da59.tar.gz nixlib-600adcfdcc0c177cd69207ce1e05a9c37107da59.tar.bz2 nixlib-600adcfdcc0c177cd69207ce1e05a9c37107da59.tar.lz nixlib-600adcfdcc0c177cd69207ce1e05a9c37107da59.tar.xz nixlib-600adcfdcc0c177cd69207ce1e05a9c37107da59.tar.zst nixlib-600adcfdcc0c177cd69207ce1e05a9c37107da59.zip |
Merge pull request #187994 from Izorkin/update-nginx-gzip
Diffstat (limited to 'nixos/modules/services/web-servers/nginx/default.nix')
-rw-r--r-- | nixos/modules/services/web-servers/nginx/default.nix | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index c0b90997ae9b..20750d87c3a1 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -184,25 +184,17 @@ let brotli_window 512k; brotli_min_length 256; brotli_types ${lib.concatStringsSep " " compressMimeTypes}; - brotli_buffers 32 8k; ''} + # https://docs.nginx.com/nginx/admin-guide/web-server/compression/ ${optionalString cfg.recommendedGzipSettings '' gzip on; - gzip_proxied any; - gzip_comp_level 5; - 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_static on; gzip_vary on; + gzip_comp_level 5; + gzip_min_length 256; + gzip_proxied expired no-cache no-store private auth; + gzip_types ${lib.concatStringsSep " " compressMimeTypes}; ''} ${optionalString cfg.recommendedProxySettings '' |