summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Al Sahaf <msaa1990@gmail.com>2022-03-11 18:55:37 +0300
committerGitHub <noreply@github.com>2022-03-11 10:55:37 -0500
commitb82e22b459b9f81278810dc32916ca270efa888c (patch)
tree634740ca20fbd6cce09c0618b4926036f0d4d5a9
parentbf6a1b75385da101bad110926c7f2b5f25395959 (diff)
caddyhttp: retain all values of vars matcher when specified multiple times (#4629)
-rw-r--r--modules/caddyhttp/vars.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/vars.go b/modules/caddyhttp/vars.go
index 91a2072..b0f10a7 100644
--- a/modules/caddyhttp/vars.go
+++ b/modules/caddyhttp/vars.go
@@ -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")
}