Skip to content

Commit

Permalink
reverseproxy: Add placeholder for host in active health check headers (
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie authored Jul 6, 2024
1 parent c3fb5f4 commit 7142d7c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/caddyhttp/reverseproxy/healthchecks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 7142d7c

Please sign in to comment.