From b0f9ca52e3efb1aeaf31c00940bfddecdf0fd355 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Fri, 17 May 2024 14:37:25 +0800 Subject: [PATCH] fix nginx cache --- nginx.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nginx.conf b/nginx.conf index 36a909e8..c040df02 100644 --- a/nginx.conf +++ b/nginx.conf @@ -17,6 +17,13 @@ http { keepalive_timeout 3600; + gzip on; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + gzip_proxied any; + gzip_min_length 256; + gzip_vary on; + gzip_comp_level 6; + server { include /etc/nginx/mime.types; @@ -38,6 +45,7 @@ http { # 静态资源 expires 1y; add_header Cache-Control "public, immutable"; + root /public; } location /assets {