Skip to content

Commit 4b460f7

Browse files
committed
Turn on gzip
1 parent 24ff62d commit 4b460f7

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/etc/nginx/nginx.conf.template

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,23 @@ http {
2727
#tcp_nopush on;
2828

2929
keepalive_timeout {{ .Env.KEEPALIVE_TIMEOUT }};
30-
#gzip on;
30+
31+
# Enable gzip compression for better performance
32+
gzip on;
33+
gzip_vary on;
34+
gzip_min_length 1024;
35+
gzip_comp_level 6;
36+
gzip_types
37+
text/plain
38+
text/xml
39+
text/css
40+
text/javascript
41+
application/xml
42+
application/json
43+
application/javascript
44+
application/xml+rss
45+
application/atom+xml
46+
image/svg+xml;
3147

3248
# Don't leak information about this server.
3349
server_tokens off;

0 commit comments

Comments
 (0)