log: Clarify header examples for sensitive headers

This commit is contained in:
Francis Lavoie 2023-02-16 04:14:39 -05:00
parent 3bc711fd62
commit b58f576478
No known key found for this signature in database
GPG key ID: 29B92EA7430C3C62

View file

@ -354,21 +354,22 @@ log {
}
```
Delete the Authorization request header from the logs:
Delete the `User-Agent` request header from the logs:
```caddy-d
log {
format filter {
wrap console
fields {
request>headers>Authorization delete
request>headers>User-Agent delete
}
}
}
```
Redact multiple sensitive cookies:
Redact multiple sensitive cookies. (Note that some sensitive headers are logged with empty values by default; see the [`log_credentials` global option](/docs/caddyfile/options#log-credentials) to enable logging `Cookie` header values):
```caddy-d
log {