caddyhttp: retain all values of vars matcher when specified multiple times (#4629)

This commit is contained in:
Mohammed Al Sahaf 2022-03-11 18:55:37 +03:00 committed by GitHub
parent bf6a1b7538
commit b82e22b459
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@ func (m *VarsMatcher) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
if len(vals) == 0 {
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) {
return d.Err("malformed vars matcher: blocks are not supported")
}