feat(forward): add max connect attempts knob (#7722)

This commit is contained in:
Ville Vesilehto
2025-12-02 04:06:52 +02:00
committed by GitHub
parent 5cb2c5dbf5
commit c2894d47d6
5 changed files with 126 additions and 39 deletions

View File

@@ -227,6 +227,15 @@ func parseBlock(c *caddy.Controller, f *Forward) error {
return err
}
f.maxfails = uint32(n)
case "max_connect_attempts":
if !c.NextArg() {
return c.ArgErr()
}
n, err := strconv.ParseUint(c.Val(), 10, 32)
if err != nil {
return err
}
f.maxConnectAttempts = uint32(n)
case "health_check":
if !c.NextArg() {
return c.ArgErr()