nginx增加gzip压缩,webpack预压缩gz文件

This commit is contained in:
whyour
2021-03-29 10:08:19 +08:00
parent b10e77dce6
commit 1cec38243c
3 changed files with 22 additions and 0 deletions
+9
View File
@@ -11,6 +11,15 @@ server {
proxy_pass http://api;
}
gzip on;
gzip_static on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
location / {
index index.html index.htm;
try_files $uri $uri/ /index.html;