Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable health check request logs (admin) #3496

Merged
merged 1 commit into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func setup(ctx context.Context, d driver.Registry, cmd *cobra.Command) (admin *h
NewMiddlewareFromLogger(d.Logger(),
fmt.Sprintf("hydra/admin: %s", d.Config().IssuerURL(ctx).String()))
if d.Config().DisableHealthAccessLog(config.AdminInterface) {
adminLogger = adminLogger.ExcludePaths("/admin"+healthx.AliveCheckPath, "/admin"+healthx.ReadyCheckPath)
adminLogger = adminLogger.ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about this? The path is - if I recall correctly - /admin/health/status

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure the path is actually /health/alive

when testing the endpoints manually i get a proper response:

curl localhost:4445/health/alive   
{"status":"ok"}

while localhost:4445/admin/health/status returns a 404.

this path is also used by the helm chart:
https://github.com/ory/k8s/blob/master/helm/charts/hydra/templates/deployment.yaml#L92-L95

}

adminmw.Use(adminLogger)
Expand Down