@ -211,7 +247,7 @@ func (a filterAction) IsValid() error {
}
}
typequeryFilterActionstruct{
typequeryFilterActionstruct{
// `replace` to replace the value(s) associated with the parameter(s) or `delete` to remove them entirely.
// `replace` to replace the value(s) associated with the parameter(s), `hash` to replace them with the 4 initial bytes of the SHA-256 of their content or `delete` to remove them entirely.
TypefilterAction`json:"type"`
TypefilterAction`json:"type"`
// The name of the query parameter.
// The name of the query parameter.
@ -224,9 +260,9 @@ type queryFilterAction struct {
// QueryFilter is a Caddy log field filter that filters
// QueryFilter is a Caddy log field filter that filters
// query parameters from a URL.
// query parameters from a URL.
//
//
// This filter updates the logged URL string to remove or replace query
// This filter updates the logged URL string to remove, replace or hash
// parameters containing sensitive data. For instance, it can be used
// query parameters containing sensitive data. For instance, it can be
// to redact any kind of secrets which were passed as query parameters,
// used to redact any kind of secrets which were passed as query parameters,
// such as OAuth access tokens, session IDs, magic link tokens, etc.
// such as OAuth access tokens, session IDs, magic link tokens, etc.
typeQueryFilterstruct{
typeQueryFilterstruct{
// A list of actions to apply to the query parameters of the URL.
// A list of actions to apply to the query parameters of the URL.
// `replace` to replace the value of the cookie or `delete` to remove it entirely.
// `replace` to replace the value of the cookie, `hash` to replace it with the 4 initial bytes of the SHA-256 of its content or `delete` to remove it entirely.
TypefilterAction`json:"type"`
TypefilterAction`json:"type"`
// The name of the cookie.
// The name of the cookie.
@ -330,7 +379,7 @@ type cookieFilterAction struct {
// cookies.
// cookies.
//
//
// This filter updates the logged HTTP header string
// This filter updates the logged HTTP header string
// to remove or replace cookies containing sensitive data. For instance,
// to remove, replace or hash cookies containing sensitive data. For instance,
// it can be used to redact any kind of secrets, such as session IDs.
// it can be used to redact any kind of secrets, such as session IDs.
//
//
// If several actions are configured for the same cookie name, only the first
// If several actions are configured for the same cookie name, only the first