1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

reverseproxy: Add placeholder for host in active health check headers (#6440)

This commit is contained in:
Francis Lavoie 2024-07-06 12:43:19 -04:00 committed by GitHub
parent c3fb5f4d3f
commit 7142d7c1e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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