From a5aa4fce340ac6c241ef19005d9d1ff0a4eef4e4 Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Tue, 10 Mar 2020 19:56:13 +0100 Subject: [PATCH] Enable compression for static files and media --- module.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module.nix b/module.nix index da5de1a..6ae052c 100644 --- a/module.nix +++ b/module.nix @@ -105,9 +105,7 @@ in serverAliases = cfg.hostNameAliases; forceSSL = true; enableACME = true; - extraConfig = hsts + '' - gzip off; - ''; + extraConfig = hsts; locations."/static/".alias = "${static}/"; locations."/media/".alias = "${cfg.stateDir}/media/"; locations."= /favicon.ico".return = "404"; @@ -116,6 +114,7 @@ in extraConfig = '' proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; + gzip off; ''; }; };