From d010200de7c05009a1b673cbccc4be03cb6a5776 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Wed, 6 Aug 2025 17:29:55 +0200 Subject: [PATCH] Update main.go --- main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 2d26a98..28026c2 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ type Backend struct { Mode string CookieName string CookieFlags string - HealthCheck bool + HealthCheck string ServerOptions string Servers []BackendServer } @@ -208,8 +208,10 @@ func main() { if val, ok := ann["haproxy/cookie-flags"]; ok && val != "" { b.CookieFlags = val } - if val, ok := ann["haproxy/health-check"]; ok && strings.ToLower(val) == "false" { - b.HealthCheck = false + if val, ok := ann["haproxy/health-check"]; ok && val != "" { + b.HealthCheck = val + } else { + b.HealthCheck = "" } if val, ok := ann["haproxy/server-options"]; ok && val != "" { b.ServerOptions = val