Skip to content

Commit

Permalink
Update modules/logging/filters.go
Browse files Browse the repository at this point in the history
Co-authored-by: Francis Lavoie <[email protected]>
  • Loading branch information
dunglas and francislavoie authored Nov 20, 2021
1 parent 0fd54de commit 1ad91db
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions modules/logging/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,13 @@ type queryFilterAction struct {
Value string `json:"value,omitempty"`
}

// QueryFilter is a Caddy log field filter that
// filters query parameters from an URL.
// It updates the filtered URL to remove or replace query parameters containing sensitive data.
// For instance, it can be used to redact OAuth access tokens, session IDs, magic links tokens
// or JWT when passed as query parameters (which is generally considered a bad practice, but cannot
// always be avoided).
// QueryFilter is a Caddy log field filter that filters
// query parameters from a URL.
//
// This filter updates the logged URL string to remove or replace query
// parameters containing sensitive data. For instance, it can be used
// to redact any kind of secrets which were passed as query parameters,
// such as OAuth access tokens, session IDs, magic link tokens, etc.
type QueryFilter struct {
// A list of actions to apply to the query parameters of the URL.
Actions []queryFilterAction `json:"actions"`
Expand Down

0 comments on commit 1ad91db

Please sign in to comment.