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:
parent
c3fb5f4d3f
commit
7142d7c1e4
1 changed files with 1 additions and 0 deletions
|
@ -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 a new issue