0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

Warn upon use of proxy_header

This commit is contained in:
Matthew Holt 2016-08-08 13:47:51 -06:00
parent 4b3c532573
commit ce8b1dfe94

View file

@ -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