mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-14 23:06:27 +03:00
caddyhttp: retain all values of vars matcher when specified multiple times (#4629)
This commit is contained in:
parent
bf6a1b7538
commit
b82e22b459
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ func (m *VarsMatcher) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||||
if len(vals) == 0 {
|
if len(vals) == 0 {
|
||||||
return d.Errf("malformed vars matcher: expected at least one value to match against")
|
return d.Errf("malformed vars matcher: expected at least one value to match against")
|
||||||
}
|
}
|
||||||
(*m)[field] = vals
|
(*m)[field] = append((*m)[field], vals...)
|
||||||
if d.NextBlock(0) {
|
if d.NextBlock(0) {
|
||||||
return d.Err("malformed vars matcher: blocks are not supported")
|
return d.Err("malformed vars matcher: blocks are not supported")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue