mirror of
https://github.com/caddyserver/website.git
synced 2025-04-25 14:36:16 -04:00
Big Caddyfile docs update (#374)
This commit is contained in:
parent
3ec3033602
commit
22301d6a81
34 changed files with 1732 additions and 512 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue