mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
plugin/forward: improve tls configuration (#1643)
This commit is contained in:
committed by
Miek Gieben
parent
0e0a641f16
commit
f19a3b24ca
@@ -200,11 +200,11 @@ func parseBlock(c *caddy.Controller, f *Forward) error {
|
||||
f.forceTCP = true
|
||||
case "tls":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) != 3 {
|
||||
if len(args) > 3 {
|
||||
return c.ArgErr()
|
||||
}
|
||||
|
||||
tlsConfig, err := pkgtls.NewTLSConfig(args[0], args[1], args[2])
|
||||
tlsConfig, err := pkgtls.NewTLSConfigFromArgs(args...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user