This commit is contained in:
Sandro - 2023-03-25 16:05:49 +01:00
parent fc56e5ff3e
commit cf20a94462
2 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,6 @@
} {
hostNames = [ "gitea.c3d2.de" ];
proxyTo.host = hostRegistry.gitea.ip4;
# proxyProtocol = true;
} {
hostNames = [ "grafana.hq.c3d2.de" ];
proxyTo.host = hostRegistry.grafana.ip4;

View File

@ -117,6 +117,7 @@ in
bind :::443 v4v6
tcp-request inspect-delay 5s
tcp-request content accept if { req.ssl_hello_type 1 }
${lib.concatMapStrings ({ proxyTo, hostNames, matchArg, ... }:
lib.concatMapStrings (hostname: ''
use_backend ${canonicalize proxyTo.host}-https if { req.ssl_sni -i ${matchArg} ${hostname} }
@ -124,6 +125,7 @@ in
) cfg.proxyHosts}
${lib.concatMapStrings ({ proxyTo, proxyProtocol, ... }: ''
backend ${canonicalize proxyTo.host}-https
server ${canonicalize proxyTo.host}-https ${proxyTo.host}:${toString proxyTo.httpsPort} weight 1 check ${lib.optionalString proxyProtocol "send-proxy"}
'') cfg.proxyHosts}