Browse Source

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

master
Mohammed Al Sahaf 3 years ago
committed by GitHub
parent
commit
b82e22b459
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/caddyhttp/vars.go

2
modules/caddyhttp/vars.go

@ -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…
Cancel
Save