caddy: Compress by default

This commit is contained in:
SebastianStork 2025-09-28 11:52:57 +02:00
parent 4b886ad6a0
commit fc61676f7c

View file

@ -131,6 +131,7 @@ in
extraConfig =
let
mkHostConfig = value: ''
encode
import subdomain-log ${value.domain}
@${value.domain |> getSubdomain} host ${(lib.optionalString (!value.tls) "http://") + value.domain}
handle @${value.domain |> getSubdomain} {
@ -171,6 +172,7 @@ in
logFormat = "output file ${config.services.caddy.logDir}/${value.domain}.log { mode 640 }";
extraConfig = ''
bind tailscale/${getSubdomain value.domain}
encode
reverse_proxy localhost:${builtins.toString value.port} ${
lib.optionalString (value.extraReverseProxyConfig != "") "{ ${value.extraReverseProxyConfig} }"
}