Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 10:45 UTC
reverseproxy: Add placeholder for host in active health check headers (#6440)
Francis Lavoie committed
Jul 6, 2024 at 12:43 UTC
7142d7c1e43ba2dad8e0118aa29d77dc74b44dda
1 file changed
+1
modules/caddyhttp/reverseproxy/healthchecks.go
+1
@@ -386,6 +386,7 @@ func (h *Handler) doActiveHealthCheck(dialInfo DialInfo, hostAddr string, upstre
386
387
// set headers, using a replacer with only globals (env vars, system info, etc.)
388
repl := caddy.NewReplacer()
389
+ repl.Set("http.reverse_proxy.active.target_host", hostAddr)
390
for key, vals := range h.HealthChecks.Active.Headers {
391
key = repl.ReplaceAll(key, "")
392
if key == "Host" {