diff options
author | Alan Pearce | 2024-05-15 22:28:35 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-15 22:28:35 +0200 |
commit | d9d6a8541ee5b0968719a4cdbe5b3506e3603dee (patch) | |
tree | 75574bc22cca78c773a7c879a74bce49fd9bbb17 | |
parent | 4a47b6c986401623bae405b2e12000106f2cf62c (diff) | |
download | nixfiles-d9d6a8541ee5b0968719a4cdbe5b3506e3603dee.tar.lz nixfiles-d9d6a8541ee5b0968719a4cdbe5b3506e3603dee.tar.zst nixfiles-d9d6a8541ee5b0968719a4cdbe5b3506e3603dee.zip |
linde: prefer zstd over gzip in caddy
-rw-r--r-- | system/linde.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/system/linde.nix b/system/linde.nix index 8be5f47b..9cf9d32b 100644 --- a/system/linde.nix +++ b/system/linde.nix @@ -609,8 +609,8 @@ in "files.alanpearce.eu" = { useACMEHost = "alanpearce.eu"; extraConfig = '' + encode zstd gzip root * /srv/http/files - encode gzip zstd file_server browse ''; }; @@ -623,7 +623,7 @@ in useACMEHost = "alanpearce.eu"; extraConfig = '' root * ${pkgs.cgit-pink}/cgit/ - encode gzip zstd + encode zstd gzip handle_path /custom/* { file_server { root /srv/http/cgit/ @@ -684,6 +684,7 @@ in "ntfy.alanpearce.eu" = { useACMEHost = "alanpearce.eu"; extraConfig = '' + encode zstd gzip reverse_proxy localhost${config.services.ntfy-sh.settings.listen-http} ''; }; @@ -691,6 +692,17 @@ in useACMEHost = "alanpearce.eu"; extraConfig = '' reverse_proxy localhost:${toString config.services.searchix.settings.web.port} + encode zstd gzip { + match { + header Content-Type text/* + header Content-Type application/json* + header Content-Type application/javascript* + header Content-Type application/opensearchdescription+xml + header Content-Type application/atom+xml* + header Content-Type application/rss+xml* + header Content-Type image/svg+xml* + } + } ''; }; "legit.alanpearce.eu" = @@ -700,6 +712,7 @@ in { useACMEHost = "alanpearce.eu"; extraConfig = '' + encode zstd gzip handle_path /static/* { root * /srv/http/legit/src/static file_server @@ -709,6 +722,7 @@ in }; "papers.alanpearce.eu" = { extraConfig = '' + encode zstd gzip handle_path /static/* { root * ${config.services.paperless.package}/lib/paperless-ngx/static file_server |