Skip to content

Commit

Permalink
Fixing prefix order in dial (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanmik committed May 23, 2021
1 parent 6283b90 commit 8d9d16a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adc.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (cl *Client) dial() (ldap.Client, error) {
return &mockClient{}, nil
}
var opts []ldap.DialOpt
if strings.HasPrefix("ldaps://", cl.cfg.URL) {
if strings.HasPrefix(cl.cfg.URL, "ldaps://") {
opts = append(opts, ldap.DialWithTLSConfig(&tls.Config{InsecureSkipVerify: cl.cfg.InsecureTLS}))
}
return ldap.DialURL(cl.cfg.URL, opts...)
Expand Down

0 comments on commit 8d9d16a

Please sign in to comment.