mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 12:36:16 -04:00
docs: Add Caddyfile env var default value (#112)
This commit is contained in:
parent
44c7994cb1
commit
970aadb620
1 changed files with 6 additions and 0 deletions
|
@ -298,6 +298,12 @@ If your configuration relies on environment variables, you can use them in the C
|
|||
|
||||
Environment variables in this form are substituted before parsing begins, so they can expand to empty values, partial tokens, complete tokens, or even multiple tokens and lines.
|
||||
|
||||
A default value can be specified for when the environment variable is not found, by using `:` as the delimiter between the variable name and the default value:
|
||||
|
||||
```caddy
|
||||
{$DOMAIN:localhost}
|
||||
```
|
||||
|
||||
If you want to defer the substitution of an environment variable until runtime, you can use the [standard `{env.*}` placeholders](/docs/conventions#placeholders).
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue