From 54db4e59d3f8fd84464f92c16cbfca82baf42f43 Mon Sep 17 00:00:00 2001 From: "EcmaProSrc.P/ka" Date: Sun, 4 Nov 2018 21:40:21 +0800 Subject: [PATCH] Update nginx.conf (#2742) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 禁用 image/jpeg image/gif image/png,因为图片启用Gzip压缩会适得其反; 启用 application/json,支持 json 数据的 Gzip 压缩。 --- docker/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx.conf b/docker/nginx.conf index a8e283a6..5f86992c 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -4,7 +4,7 @@ server { gzip on; gzip_min_length 1k; gzip_comp_level 9; - gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; + gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml; gzip_vary on; gzip_disable "MSIE [1-6]\."; -- GitLab