mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 07:43:17 +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:
parent
1edc1a45e3
commit
7c35bfa57c
2 changed files with 24 additions and 19 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue