Fix forward metrics for backwards compatibility (#6178)
This commit is contained in:
parent
6e1263d3d9
commit
ea293da1d6
14 changed files with 87 additions and 78 deletions
|
@ -19,7 +19,9 @@ import (
|
|||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
func init() { plugin.Register("forward", setup) }
|
||||
func init() {
|
||||
plugin.Register("forward", setup)
|
||||
}
|
||||
|
||||
func setup(c *caddy.Controller) error {
|
||||
fs, err := parseForward(c)
|
||||
|
@ -128,7 +130,7 @@ func parseStanza(c *caddy.Controller) (*Forward, error) {
|
|||
if !allowedTrans[trans] {
|
||||
return f, fmt.Errorf("'%s' is not supported as a destination protocol in forward: %s", trans, host)
|
||||
}
|
||||
p := proxy.NewProxy(h, trans)
|
||||
p := proxy.NewProxy("forward", h, trans)
|
||||
f.proxies = append(f.proxies, p)
|
||||
transports[i] = trans
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue