enable gzip compression

This commit is contained in:
b1ek 2023-05-18 11:33:13 +10:00
parent 75c9dab602
commit 91e3a0e4bf
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,9 @@ http {
server { server {
listen 80; 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)/ { location ~ ^/(api|admin)/ {
proxy_pass http://back; proxy_pass http://back;
@ -33,6 +36,7 @@ http {
location / { location / {
root /var/www/html; root /var/www/html;
try_files $uri $uri/ /; try_files $uri $uri/ /;
gzip_static on;
} }
location ~ ^/\. { location ~ ^/\. {