From a28d43f381972b5fde8f5330f53f38cdc181e9bd Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 9 Dec 2024 13:40:22 -0700 Subject: [PATCH] Fix gzip --- flake.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 9b0245a..50a2f7c 100644 --- a/flake.nix +++ b/flake.nix @@ -48,14 +48,14 @@ user nginx nginx; daemon off; error_log /dev/stdout info; - gzip on; - gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; pid /dev/null; events {} http { include ${mimeTypes}; access_log /dev/stdout; server { + gzip on; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; listen 80; index index.php index.html; charset utf-8; @@ -63,7 +63,8 @@ add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options "nosniff"; location / { - root ${staticAssetsPath}; + gzip_static on; + root ${staticAssetsPath}; try_files $uri $uri/ /index.html; } }