Add `gzip` settings.

This commit is contained in:
Kazuhiro MUSASHI 2020-09-06 13:31:03 +09:00
parent 2de591be19
commit 7e3f6eba3d
1 changed files with 28 additions and 0 deletions

View File

@ -64,6 +64,34 @@ http {
# if client stop responding, free up memory -- default 60
send_timeout 2s;
##
# gzip Settings
##
gzip on;
gzip_static on;
gzip_min_length 10240;
gzip_comp_level 1;
gzip_vary on;
gzip_disable msie6;
gzip_proxied expired no-cache no-store private auth;
gzip_types
text/html
text/css
text/javascript
text/xml
text/plain
text/x-component
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
application/atom+xml
font/truetype
font/opentype
application/vnd.ms-fontobject
image/svg+xml;
##
# Logging Settings
##