mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-19 05:42:45 +08:00
rewrite: Return parse error if too many Caddyfile args (fixes #2791)
This commit is contained in:
parent
be7abda7d4
commit
8c55167f71
|
@ -32,6 +32,9 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
|
|||
var rewr Rewrite
|
||||
for h.Next() {
|
||||
rewr.URI = h.Val()
|
||||
if h.NextArg() {
|
||||
return nil, h.ArgErr()
|
||||
}
|
||||
}
|
||||
rewr.Rehandle = true
|
||||
return rewr, nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user