Update main.go
Some checks failed
Build Go Binary / build (push) Has been cancelled

This commit is contained in:
holzi1005 2025-08-06 17:29:55 +02:00
parent 5e645198a7
commit d010200de7

View file

@ -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