Big Caddyfile docs update (#374)

This commit is contained in:
Francis Lavoie 2024-02-20 06:49:30 -05:00 committed by GitHub
parent 3ec3033602
commit 22301d6a81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 1732 additions and 512 deletions

View file

@ -27,11 +27,13 @@ vars [<matcher>] [<name> <value>] {
To set a single variable, the value being conditional based on the request path, then responding with the value:
```caddy-d
vars /foo* isFoo "yep"
vars isFoo "nope"
```caddy
example.com {
vars /foo* isFoo "yep"
vars isFoo "nope"
respond {vars.isFoo}
respond {vars.isFoo}
}
```
To set multiple variables, each converted to the appropriate scalar type: