Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shilgapira committed Dec 19, 2023
1 parent c2144b1 commit 180f441
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions descope/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1078,15 +1078,13 @@ func (mode CertificateVerifyMode) SkipVerifyValue(baseURL string) bool {
if mode == CertificateVerifyNever {
return true
}
url, err := urlpkg.Parse(baseURL)
if err != nil {
return false
}
if url.Hostname() == "localhost" || url.Port() != "" {
return true
}
if ip := net.ParseIP(url.Hostname()); ip != nil {
return true
if url, err := urlpkg.Parse(baseURL); err == nil {
if url.Hostname() == "localhost" || url.Port() != "" {
return true
}
if ip := net.ParseIP(url.Hostname()); ip != nil {
return true
}
}
return false
}

0 comments on commit 180f441

Please sign in to comment.