aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFrancis Lavoie <[email protected]>2024-07-06 12:43:19 -0400
committerGitHub <[email protected]>2024-07-06 10:43:19 -0600
commit7142d7c1e43ba2dad8e0118aa29d77dc74b44dda (patch)
tree3f093dd8a23cf173defea703a20e5999fcd6a235
parentc3fb5f4d3fb3eed9136f766cb88f2d8ac54de685 (diff)
downloadcaddy-7142d7c1e43ba2dad8e0118aa29d77dc74b44dda.tar.gz
caddy-7142d7c1e43ba2dad8e0118aa29d77dc74b44dda.zip
reverseproxy: Add placeholder for host in active health check headers (#6440)
-rw-r--r--modules/caddyhttp/reverseproxy/healthchecks.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/caddyhttp/reverseproxy/healthchecks.go b/modules/caddyhttp/reverseproxy/healthchecks.go
index 888dadb79..ac92604ca 100644
--- a/modules/caddyhttp/reverseproxy/healthchecks.go
+++ b/modules/caddyhttp/reverseproxy/healthchecks.go
@@ -386,6 +386,7 @@ func (h *Handler) doActiveHealthCheck(dialInfo DialInfo, hostAddr string, upstre
// set headers, using a replacer with only globals (env vars, system info, etc.)
repl := caddy.NewReplacer()
+ repl.Set("http.reverse_proxy.active.target_host", hostAddr)
for key, vals := range h.HealthChecks.Active.Headers {
key = repl.ReplaceAll(key, "")
if key == "Host" {