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.
pull/41/head
Tristan Daniël Maat 2021-05-16 01:34:03 +01:00
parent 517f4f0080
commit 458f6c7f7b
Signed by: tlater
GPG Key ID: 49670FD774E43268
1 changed files with 1 additions and 1 deletions

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" ]; };