From 389df7965b380659d6381e2980b223bb8edc4d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 28 Jan 2024 22:59:17 +0200 Subject: [PATCH] caddy: gzip encoding --- pkgs/e11sync-caddyfile.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/e11sync-caddyfile.nix b/pkgs/e11sync-caddyfile.nix index 769caaf..e706a5e 100644 --- a/pkgs/e11sync-caddyfile.nix +++ b/pkgs/e11sync-caddyfile.nix @@ -7,8 +7,9 @@ writeTextFile { name = "e11sync-caddyfile"; text = '' @addSlash path /static /blog /contact + route @addSlash { - redir {uri}/ 302 + redir {uri}/ 302 } header /static/* Cache-Control "public, max-age=31536000, immutable" @@ -21,6 +22,9 @@ writeTextFile { } } - reverse_proxy http://127.0.0.1:${toString backendPort} + route { + encode gzip + reverse_proxy http://127.0.0.1:${toString backendPort} + } ''; }