diff --git a/hosts/containers/public-access-proxy/proxy.nix b/hosts/containers/public-access-proxy/proxy.nix index a8ca2808..7027aee5 100644 --- a/hosts/containers/public-access-proxy/proxy.nix +++ b/hosts/containers/public-access-proxy/proxy.nix @@ -3,6 +3,8 @@ with lib; let cfg = config.my.services.proxy; + withoutWildcards = builtins.replaceStrings ["*"] ["all"]; + in { options.my.services.proxy = { @@ -98,8 +100,8 @@ in { optionalString (proxyHost.hostNames != [ ] && proxyHost.proxyTo.host != null) (concatMapStringsSep "\n" (hostname: '' - use-server ${hostname}-http if { req.hdr(host) -i ${hostname} } - server ${hostname}-http ${proxyHost.proxyTo.host}:${ + use-server ${withoutWildcards hostname}-http if { req.hdr(host) -i ${hostname} } + server ${withoutWildcards hostname}-http ${proxyHost.proxyTo.host}:${ toString proxyHost.proxyTo.httpPort } weight 0 '') (proxyHost.hostNames))) (cfg.proxyHosts) @@ -117,8 +119,8 @@ in { optionalString (proxyHost.hostNames != [ ] && proxyHost.proxyTo.host != null) (concatMapStringsSep "\n" (hostname: '' - use-server ${hostname}-https if { req.ssl_sni -i ${hostname} } - server ${hostname}-https ${proxyHost.proxyTo.host}:${ + use-server ${withoutWildcards hostname}-https if { req.ssl_sni -i ${hostname} } + server ${withoutWildcards hostname}-https ${proxyHost.proxyTo.host}:${ toString proxyHost.proxyTo.httpsPort } weight 0 '') (proxyHost.hostNames))) (cfg.proxyHosts)