From b88b9b670f7bee73bcd2720a162898dd94bad3a4 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Tue, 31 Mar 2020 07:07:32 +0800 Subject: [PATCH] add gzip for js and css --- etc/nginx.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/nginx.conf b/etc/nginx.conf index 1ebf6c63..0b018423 100644 --- a/etc/nginx.conf +++ b/etc/nginx.conf @@ -46,6 +46,14 @@ http { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + gzip on; + gzip_min_length 1k; + gzip_buffers 4 16k; + gzip_comp_level 2; + gzip_types application/javascript application/x-javascript text/css text/javascript image/jpeg image/gif image/png; + gzip_vary off; + gzip_disable "MSIE [1-6]\."; + upstream n9e.monapi { server 127.0.0.1:5800; keepalive 10;