Skip to content

Commit

Permalink
Add deprecation log
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Schneider authored and Marcel Ludwig committed Dec 8, 2020
1 parent 732b7d9 commit 170063d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/runtime/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ func newProxy(ctx *hcl.EvalContext, beConf *config.Backend, corsOpts *config.COR
log.Fatal(err)
}

for _, name := range []string{"request_headers", "response_headers"} {
for _, body := range remainCtx {
options, _ := handler.NewCtxOptions(name, ctx, body)
if len(options) > 0 {
log.Warningf("'%s' is deprecated, use 'set_%s' instead", name, name)
}
}
}

proxyOptions, err := handler.NewProxyOptions(beConf, corsOptions, remainCtx)
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 170063d

Please sign in to comment.