mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Fix forward metrics for backwards compatibility (#6178)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user