diff --git a/internal/endpoint/endpoint.go b/internal/endpoint/endpoint.go index a4aaf911f..a125d924f 100644 --- a/internal/endpoint/endpoint.go +++ b/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