docs: A few minor updates / clarifications

This commit is contained in:
Matthew Holt 2020-04-22 16:31:30 -06:00
parent cc329950b8
commit 86df96a069
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
3 changed files with 9 additions and 2 deletions

View file

@ -269,6 +269,8 @@ Comments start with `#` and proceed until the end of the line:
directive # or go at the end
```
The hash character `#` cannot appear in the middle of a token (i.e. it must be preceded by a space or appear at the beginning of a line). This allows the use of hashes within URIs or other values without requiring quoting.
## Environment variables

View file

@ -105,7 +105,12 @@ It can also **manipulate headers** between itself and the backend:
- **header_up** Sets, adds, removes, or performs a replacement in a request header going upstream to the backend.
- **header_down** Sets, adds, removes, or performs a replacement in a response header coming downstream from the backend.
By default, Caddy passes thru incoming headers to the backend—including the `Host` header—without modifications, with one exception: it adds or augments the [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) header field as is standard for well-mannered proxies.
By default, Caddy passes thru incoming headers to the backend—including the `Host` header—without modifications, with two exceptions:
- It adds or augments the [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) header field.
- It sets the [X-Forwarded-Proto](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto) header field.
Since these header fields are only de-facto standards, Caddy may stop setting them implicitly in the future if the standardized [Forwarded](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded) header field becomes more widely adopted.
Caddy's proxy **transport** is pluggable:

View file

@ -264,7 +264,7 @@ Runs Caddy and blocks indefinitely; i.e. "daemon" mode.
`--resume` uses the last loaded configuration, overriding the `--config` flag (if present) if a previous config was saved. Using this flag guarantees config durability through machine reboots or process restarts. It is most useful in [API](/docs/api)-heavy deployments.
`--watch` will watch the config file and automatically reload it after it changes. ⚠️ This feature is dangerous in production! Only use it in a local development environment.
`--watch` will watch the config file and automatically reload it after it changes. ⚠️ This feature is intended for use only in local development environments!
<aside class="advice">
Do not stop the server to change configuration while running in production! That will result in downtime. (This should be obvious but you'd be surprised how many complaints we get about it.) Use the <a href="#caddy-reload">caddy reload</a> command instead.