Use upstream parsing from master branch (#438)
This commit is contained in:
parent
a951fee291
commit
f8b9332265
2 changed files with 9 additions and 14 deletions
|
@ -2,7 +2,6 @@ package file
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
|
@ -107,13 +106,11 @@ func fileParse(c *caddy.Controller) (Zones, error) {
|
|||
if len(args) == 0 {
|
||||
return Zones{}, c.ArgErr()
|
||||
}
|
||||
for i := 0; i < len(args); i++ {
|
||||
h, p, e := net.SplitHostPort(args[i])
|
||||
if e != nil && p == "" {
|
||||
args[i] = h + ":53"
|
||||
}
|
||||
ups, err := dnsutil.ParseHostPortOrFile(args...)
|
||||
if err != nil {
|
||||
return Zones{}, err
|
||||
}
|
||||
prxy = proxy.New(args)
|
||||
prxy = proxy.New(ups)
|
||||
}
|
||||
|
||||
for _, origin := range origins {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue