Revert "plugin/tls: respect the path specified by root plugin (#5944)" (#6136)

This reverts commit d0375bc026.
This commit is contained in:
Chris O'Haver 2023-06-01 14:07:58 -04:00 committed by GitHub
parent d0375bc026
commit d3965b8b60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 27 deletions

View file

@ -4,7 +4,6 @@ import (
"crypto/tls"
"errors"
"fmt"
"path/filepath"
"strconv"
"time"
@ -166,7 +165,6 @@ func parseStanza(c *caddy.Controller) (*Forward, error) {
}
func parseBlock(c *caddy.Controller, f *Forward) error {
config := dnsserver.GetConfig(c)
switch c.Val() {
case "except":
ignore := c.RemainingArgs()
@ -232,11 +230,7 @@ func parseBlock(c *caddy.Controller, f *Forward) error {
if len(args) > 3 {
return c.ArgErr()
}
for i := range args {
if !filepath.IsAbs(args[i]) && config.Root != "" {
args[i] = filepath.Join(config.Root, args[i])
}
}
tlsConfig, err := pkgtls.NewTLSConfigFromArgs(args...)
if err != nil {
return err