mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 12:36:16 -04:00
docs: Add a few code lang labels, minor cleanup
This commit is contained in:
parent
f655da2c2e
commit
1367aebe20
3 changed files with 7 additions and 6 deletions
|
@ -141,13 +141,13 @@ directive "\"abc def\""
|
||||||
|
|
||||||
Inside quoted tokens, all other characters are treated literally, including spaces, tabs, and newlines.
|
Inside quoted tokens, all other characters are treated literally, including spaces, tabs, and newlines.
|
||||||
|
|
||||||
You can also use a backtick (`\``) to quote tokens:
|
You can also use a backtick <code>`</code> to quote tokens:
|
||||||
|
|
||||||
```
|
```caddy-d
|
||||||
directive `"foo bar"`
|
directive `"foo bar"`
|
||||||
```
|
```
|
||||||
|
|
||||||
Backtick strings are convenient when tokens contain quote literals.
|
Backtick strings are convenient when tokens contain quote literals, e.g. JSON text.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -231,6 +231,7 @@ You can use any [Caddy placeholders](/docs/conventions#placeholders) in the Cadd
|
||||||
| `{host}` | `{http.request.host}` |
|
| `{host}` | `{http.request.host}` |
|
||||||
| `{labels.*}` | `{http.request.host.labels.*}` |
|
| `{labels.*}` | `{http.request.host.labels.*}` |
|
||||||
| `{hostport}` | `{http.request.hostport}` |
|
| `{hostport}` | `{http.request.hostport}` |
|
||||||
|
| `{port}` | `{http.request.port}` |
|
||||||
| `{method}` | `{http.request.method}` |
|
| `{method}` | `{http.request.method}` |
|
||||||
| `{path}` | `{http.request.uri.path}` |
|
| `{path}` | `{http.request.uri.path}` |
|
||||||
| `{path.*}` | `{http.request.uri.path.*}` |
|
| `{path.*}` | `{http.request.uri.path.*}` |
|
||||||
|
|
|
@ -142,7 +142,7 @@ transport http {
|
||||||
- **tls_insecure_skip_verify** turns off security. _Do not use in production._
|
- **tls_insecure_skip_verify** turns off security. _Do not use in production._
|
||||||
- **tls_timeout** is a [duration value](/docs/conventions#durations) that specifies how long to wait for the TLS handshake to complete.
|
- **tls_timeout** is a [duration value](/docs/conventions#durations) that specifies how long to wait for the TLS handshake to complete.
|
||||||
- **tls_trusted_ca_certs** is a list of PEM files that specify CA public keys to trust when connecting to the backend.
|
- **tls_trusted_ca_certs** is a list of PEM files that specify CA public keys to trust when connecting to the backend.
|
||||||
- **tls_server_name** sets the ServerName (SNI) to put in the ClientHello; only needed if the remote server it.
|
- **tls_server_name** sets the ServerName (SNI) to put in the ClientHello; only needed if the remote server requires it.
|
||||||
- **keepalive** is either `off` or a [duration value](/docs/conventions#durations) that specifies how long to keep connections open.
|
- **keepalive** is either `off` or a [duration value](/docs/conventions#durations) that specifies how long to keep connections open.
|
||||||
- **keepalive_idle_conns** defines the maximum number of connections to keep alive.
|
- **keepalive_idle_conns** defines the maximum number of connections to keep alive.
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ Defining a matcher with a unique name gives you more flexibility, allowing you t
|
||||||
|
|
||||||
or, if there is only one matcher in the set:
|
or, if there is only one matcher in the set:
|
||||||
|
|
||||||
```
|
```caddy-d
|
||||||
@name ...
|
@name ...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ This proxies only the requests that have a header field named "Connection" conta
|
||||||
|
|
||||||
If the matcher set consists of only one matcher, a one-liner syntax also works:
|
If the matcher set consists of only one matcher, a one-liner syntax also works:
|
||||||
|
|
||||||
```
|
```caddy-d
|
||||||
@post method POST
|
@post method POST
|
||||||
reverse_proxy @post localhost:6001
|
reverse_proxy @post localhost:6001
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue