From befd0f6ecd6225f475a487779d3078eff7014a64 Mon Sep 17 00:00:00 2001 From: bt90 Date: Fri, 30 Dec 2022 03:37:50 +0100 Subject: [PATCH] Compress more types (#1211) --- nginx/nginx.conf | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index b93f2b9c7d..36003facea 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -38,8 +38,19 @@ http { server { + # Compression gzip on; + gzip_comp_level 2; gzip_min_length 1000; + gzip_proxied any; + gzip_types + application/javascript + application/json + font/truetype + image/svg+xml + text/css + text/html; + gzip_vary on; gunzip on; client_max_body_size 50000M; @@ -49,11 +60,6 @@ http { location /api { - # Compression - gzip_static on; - gzip_min_length 1000; - gzip_comp_level 2; - proxy_buffering off; proxy_buffer_size 16k; proxy_busy_buffers_size 24k; @@ -76,11 +82,6 @@ http { location / { - # Compression - gzip_static on; - gzip_min_length 1000; - gzip_comp_level 2; - proxy_buffering off; proxy_buffer_size 16k; proxy_busy_buffers_size 24k;