From 91e3a0e4bfa02065547dd5a27362d16889c89177 Mon Sep 17 00:00:00 2001 From: b1ek Date: Thu, 18 May 2023 11:33:13 +1000 Subject: [PATCH] enable gzip compression --- conf/nginx/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/nginx/nginx.conf b/conf/nginx/nginx.conf index 5ce002e..b57bf88 100644 --- a/conf/nginx/nginx.conf +++ b/conf/nginx/nginx.conf @@ -25,6 +25,9 @@ http { server { listen 80; + gzip on; + gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype; + gzip_min_length 1000; location ~ ^/(api|admin)/ { proxy_pass http://back; @@ -33,6 +36,7 @@ http { location / { root /var/www/html; try_files $uri $uri/ /; + gzip_static on; } location ~ ^/\. {