From 9bd82c98941830fcba1ec31e1f1b933b44a3371f Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Wed, 24 Jul 2024 15:24:47 +0100 Subject: [PATCH] Check method as well as path --- internal/server/target.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/server/target.go b/internal/server/target.go index cd1d0a7..901e449 100644 --- a/internal/server/target.go +++ b/internal/server/target.go @@ -130,7 +130,7 @@ func (t *Target) SendRequest(w http.ResponseWriter, req *http.Request) { } func (t *Target) IsHealthCheckRequest(r *http.Request) bool { - return t.options.HealthCheckConfig.Path == r.URL.Path + return r.Method == http.MethodGet && r.URL.Path == t.options.HealthCheckConfig.Path } func (t *Target) Rewrite(req *httputil.ProxyRequest) {