mirror of
https://github.com/caddyserver/caddy.git
synced 2026-01-16 17:20:34 +00:00
caddyhttp: Accept placeholders in vars matcher key
Until now, the vars matcher has unintentionally lacked parity with the
map directive: the destination placeholders of the map directive would
be expressed as placeholders, i.e. {foo}. But the vars matcher would
not use { }: vars foo value
This looked weird, and was confusing, since it implied that the key
could be dynamic, which doesn't seem helpful here.
I think this is a proper bug fix, since we're not used to accessing
placeholders literally without { } in the Caddyfile.
This commit is contained in:
@@ -238,6 +238,8 @@ func toString(val any) string {
|
||||
return v
|
||||
case fmt.Stringer:
|
||||
return v.String()
|
||||
case error:
|
||||
return v.Error()
|
||||
case byte:
|
||||
return string(v)
|
||||
case []byte:
|
||||
|
||||
Reference in New Issue
Block a user