From a3785967003688e4e3b141db640bd4603b9038da Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Tue, 15 Oct 2024 15:34:48 +0200 Subject: [PATCH] fix ldap check in idp Signed-off-by: Christian Richter --- services/idp/pkg/server/debug/server.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/services/idp/pkg/server/debug/server.go b/services/idp/pkg/server/debug/server.go index a06c37c3aef..2c55b5de5d9 100644 --- a/services/idp/pkg/server/debug/server.go +++ b/services/idp/pkg/server/debug/server.go @@ -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" @@ -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), )