Skip to content

Commit

Permalink
fix ldap check in idp
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <[email protected]>
  • Loading branch information
dragonchaser committed Oct 15, 2024
1 parent dd59a36 commit a378596
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions services/idp/pkg/server/debug/server.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package debug

import (
"context"
"net/http"
"net/url"

"github.com/owncloud/ocis/v2/ocis-pkg/handlers"
"github.com/owncloud/ocis/v2/ocis-pkg/service/debug"
Expand All @@ -23,18 +21,7 @@ func Server(opts ...Option) (*http.Server, error) {
readinessHandler := handlers.NewCheckHandler(
handlers.NewCheckHandlerConfiguration().
WithLogger(options.Logger).
WithCheck("tcp-check", func(ctx context.Context) error {
tcpURL := options.Config.Ldap.URI
u, err := url.Parse(options.Config.Ldap.URI)
if err != nil {
return err
}
if u.Host != "" {
tcpURL = u.Host
}

return handlers.NewTCPCheck(tcpURL)(ctx)
}).
WithCheck("ldap-check", handlers.NewTCPCheck(options.Config.Ldap.URI)).
WithInheritedChecksFrom(healthHandler.Conf),
)

Expand Down

0 comments on commit a378596

Please sign in to comment.