Skip to content

Commit a4b7e2d

Browse files
committed
Enable gzip compression in Nginx
1 parent 5b7138e commit a4b7e2d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

config/nginx.conf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ http {
2121

2222
server_tokens off;
2323

24+
# Enable gzip compression
25+
gzip on;
26+
gzip_disable "msie6";
27+
gzip_proxied any;
28+
29+
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
30+
31+
2432
# Forward the cloudfront scheme from upstream
2533
map $http_cloudfront_forwarded_proto $forwarded_scheme {
2634
default off;
@@ -58,7 +66,6 @@ http {
5866
}
5967

6068
location = /robots.txt {
61-
allow all;
6269
log_not_found off;
6370
access_log off;
6471
}

0 commit comments

Comments
 (0)