netutil: consistently format ipv6 addresses

This formats ipv6 addresses to ensure they can be compared safely

Signed-off-by: kidsan <8798449+Kidsan@users.noreply.github.com>
This commit is contained in:
kidsan
2023-01-20 16:12:06 +01:00
parent 82004d0197
commit 41ed809c38
2 changed files with 21 additions and 10 deletions

View File

@ -103,7 +103,7 @@ func resolveURL(ctx context.Context, lg *zap.Logger, u url.URL) (string, error)
)
return "", err
}
if host == "localhost" || net.ParseIP(host) != nil {
if host == "localhost" {
return "", nil
}
for ctx.Err() == nil {