logcli: Remove port from TLS server name when provided in --addr (#5477)

If connecting to a TLS secured endpoint with an explicit port,
ensure that ServerName contains only the host and not the port to avoid
a cert validation failure
pull/5724/head
Alex Tomic 4 years ago committed by GitHub
parent d4dd4eda4a
commit 3bf2efa371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/logcli/main.go

@ -228,7 +228,7 @@ func newQueryClient(app *kingpin.Application) client.Client {
if err != nil {
return err
}
client.TLSConfig.ServerName = u.Host
client.TLSConfig.ServerName = strings.Split(u.Host, ":")[0]
return nil
}

Loading…
Cancel
Save