middleware/file: transfer from does not make sense (#314)
Make it return an error when you use `transfer from` when you're not a secondary. Add tests as well. Fixes #310
This commit is contained in:
parent
560f11d148
commit
cc486fb900
3 changed files with 15 additions and 4 deletions
|
@ -63,7 +63,7 @@ func secondaryParse(c *caddy.Controller) (file.Zones, error) {
|
|||
}
|
||||
|
||||
for c.NextBlock() {
|
||||
t, f, e := file.TransferParse(c)
|
||||
t, f, e := file.TransferParse(c, true)
|
||||
if e != nil {
|
||||
return file.Zones{}, e
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue