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:
parent
4b3c532573
commit
ce8b1dfe94
1 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||||
}
|
}
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue