Update endpoint.go (#2012)

pull/2014/head
songzhibin97 3 years ago committed by GitHub
parent 2ee49311c1
commit c412d65f57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      internal/endpoint/endpoint.go

@ -21,10 +21,8 @@ func ParseEndpoint(endpoints []string, scheme string, isSecure bool) (string, er
if err != nil {
return "", err
}
if u.Scheme == scheme {
if IsSecure(u) == isSecure {
return u.Host, nil
}
if u.Scheme == scheme && IsSecure(u) == isSecure {
return u.Host, nil
}
}
return "", nil

Loading…
Cancel
Save