Commit ce8b1dfe authored by Matthew Holt's avatar Matthew Holt

Warn upon use of proxy_header

parent 4b3c5325
......@@ -16,7 +16,8 @@ import (
)
var (
supportedPolicies = make(map[string]func() Policy)
supportedPolicies = make(map[string]func() Policy)
warnedProxyHeaderDeprecation bool // TODO: Temporary, until proxy_header is removed entirely
)
type staticUpstream struct {
......@@ -280,6 +281,10 @@ func parseBlock(c *caddyfile.Dispenser, u *staticUpstream) error {
}
u.HealthCheck.Timeout = dur
case "proxy_header": // TODO: deprecate this shortly after 0.9
if !warnedProxyHeaderDeprecation {
fmt.Println("WARNING: proxy_header is deprecated and will be removed soon; use header_upstream instead.")
warnedProxyHeaderDeprecation = true
}
fallthrough
case "header_upstream":
var header, value string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment