mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 15:19:25 +08:00
reverseproxy: Add placeholder for host in active health check headers (#6440)
This commit is contained in:
parent
c3fb5f4d3f
commit
7142d7c1e4
|
@ -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" {
|
||||
|
|
Loading…
Reference in New Issue
Block a user