Skip to content

Commit

Permalink
Merge pull request #10302 from dragonchaser/basic-server-probes
Browse files Browse the repository at this point in the history
fix ldap check in idp
  • Loading branch information
dragonchaser authored Oct 15, 2024
2 parents efefa54 + a378596 commit fde6b4c
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 fde6b4c

Please sign in to comment.