nginx: Avoid connection issues caused by IPv6 resolution

If localhost is specified in the proxyPass url, nginx will happily
resolve IPv6 addresses, even if the upstream doesn't support them.

This can result in connection issues, especially with containers that
don't support IPv6.
This commit is contained in:
Tristan Daniël Maat 2021-05-16 01:34:03 +01:00
parent 517f4f0080
commit 458f6c7f7b
Signed by: tlater
GPG key ID: 49670FD774E43268

View file

@ -60,7 +60,7 @@
{
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://localhost:${toString port}"; };
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; };
} // extra;
in {
"tlater.net" = host 3002 { serverAliases = [ "www.tlater.net" ]; };