Skip to content

Commit 6195ca6

Browse files
committed
Error if subdirective is unrecognized (fix #78)
1 parent 12435ec commit 6195ca6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

caddyfile.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
214214
return d.Errf("invalid sweep interval '%s': %v", d.Val(), err)
215215
}
216216
h.SweepInterval = caddy.Duration(interval)
217+
218+
default:
219+
return d.Errf("unrecognized subdirective '%s'", d.Val())
217220
}
218221
}
219222
}

0 commit comments

Comments
 (0)