public-access-proxy: prefer ip4 over ip6 for backends
ipv6 addresses change with mac addresses but our ipv4 addresses in 'serv' are static
This commit is contained in:
parent
883222a750
commit
16e19932e8
|
@ -40,10 +40,10 @@
|
||||||
) (builtins.attrNames nixosConfig.services.nginx.virtualHosts)
|
) (builtins.attrNames nixosConfig.services.nginx.virtualHosts)
|
||||||
);
|
);
|
||||||
proxyTo.host =
|
proxyTo.host =
|
||||||
if hostRegistry.hosts.${host} ? ip6
|
if hostRegistry.hosts.${host} ? ip4
|
||||||
then "[${hostRegistry.hosts.${host}.ip6}]"
|
|
||||||
else if hostRegistry.hosts.${host} ? ip4
|
|
||||||
then hostRegistry.hosts.${host}.ip4
|
then hostRegistry.hosts.${host}.ip4
|
||||||
|
else if hostRegistry.hosts.${host} ? ip6
|
||||||
|
then "[${hostRegistry.hosts.${host}.ip6}]"
|
||||||
else throw "No known addresses for ${host}";
|
else throw "No known addresses for ${host}";
|
||||||
}
|
}
|
||||||
) (builtins.attrNames (
|
) (builtins.attrNames (
|
||||||
|
|
Loading…
Reference in New Issue