mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
caddy: Compress by default
This commit is contained in:
parent
4b886ad6a0
commit
fc61676f7c
1 changed files with 2 additions and 0 deletions
|
|
@ -131,6 +131,7 @@ in
|
||||||
extraConfig =
|
extraConfig =
|
||||||
let
|
let
|
||||||
mkHostConfig = value: ''
|
mkHostConfig = value: ''
|
||||||
|
encode
|
||||||
import subdomain-log ${value.domain}
|
import subdomain-log ${value.domain}
|
||||||
@${value.domain |> getSubdomain} host ${(lib.optionalString (!value.tls) "http://") + value.domain}
|
@${value.domain |> getSubdomain} host ${(lib.optionalString (!value.tls) "http://") + value.domain}
|
||||||
handle @${value.domain |> getSubdomain} {
|
handle @${value.domain |> getSubdomain} {
|
||||||
|
|
@ -171,6 +172,7 @@ in
|
||||||
logFormat = "output file ${config.services.caddy.logDir}/${value.domain}.log { mode 640 }";
|
logFormat = "output file ${config.services.caddy.logDir}/${value.domain}.log { mode 640 }";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
bind tailscale/${getSubdomain value.domain}
|
bind tailscale/${getSubdomain value.domain}
|
||||||
|
encode
|
||||||
reverse_proxy localhost:${builtins.toString value.port} ${
|
reverse_proxy localhost:${builtins.toString value.port} ${
|
||||||
lib.optionalString (value.extraReverseProxyConfig != "") "{ ${value.extraReverseProxyConfig} }"
|
lib.optionalString (value.extraReverseProxyConfig != "") "{ ${value.extraReverseProxyConfig} }"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue