public-access-proxy: catch ip4/ip6==null
This commit is contained in:
parent
67f4d6196a
commit
f10328915c
|
@ -54,10 +54,10 @@
|
|||
) (builtins.attrNames nixosConfig.services.nginx.virtualHosts)
|
||||
);
|
||||
proxyTo.host =
|
||||
if config.c3d2.hosts."${host}" ? ip4
|
||||
then config.c3d2.hosts."${host}".ip4
|
||||
else if config.c3d2.hosts."${host}" ? ip6
|
||||
then "[${config.c3d2.hosts."${host}".ip6}]"
|
||||
if config.c3d2.hosts.${host} ? ip4 && config.c3d2.hosts.${host}.ip4 != null
|
||||
then config.c3d2.hosts.${host}.ip4
|
||||
else if config.c3d2.hosts.${host} ? ip6 && config.c3d2.hosts.${host}.ip6 != null
|
||||
then "[${config.c3d2.hosts.${host}.ip6}]"
|
||||
else throw "No known addresses for ${host}";
|
||||
}
|
||||
) (builtins.attrNames (
|
||||
|
|
Loading…
Reference in New Issue