mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-23 06:09:10 +08:00
httpcaddyfile: Disallow args on route/handle directive family (#3740)
This commit is contained in:
parent
b1d456d8ab
commit
fe27f9cf0c
|
@ -285,6 +285,11 @@ func parseSegmentAsConfig(h Helper) ([]ConfigValue, error) {
|
|||
var allResults []ConfigValue
|
||||
|
||||
for h.Next() {
|
||||
// don't allow non-matcher args on the first line
|
||||
if h.NextArg() {
|
||||
return nil, h.ArgErr()
|
||||
}
|
||||
|
||||
// slice the linear list of tokens into top-level segments
|
||||
var segments []caddyfile.Segment
|
||||
for nesting := h.Nesting(); h.NextBlock(nesting); {
|
||||
|
|
Loading…
Reference in New Issue
Block a user