Commit ce8b1dfe authored by Matthew Holt's avatar Matthew Holt

Warn upon use of proxy_header

parent 4b3c5325
...@@ -17,6 +17,7 @@ import ( ...@@ -17,6 +17,7 @@ import (
var ( 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 { type staticUpstream struct {
...@@ -280,6 +281,10 @@ func parseBlock(c *caddyfile.Dispenser, u *staticUpstream) error { ...@@ -280,6 +281,10 @@ func parseBlock(c *caddyfile.Dispenser, u *staticUpstream) error {
} }
u.HealthCheck.Timeout = dur u.HealthCheck.Timeout = dur
case "proxy_header": // TODO: deprecate this shortly after 0.9 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 fallthrough
case "header_upstream": case "header_upstream":
var header, value string 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