From 1ad91dba0956bfb3a29547a65e5fe5b55948e966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sat, 20 Nov 2021 10:43:16 +0100 Subject: [PATCH] Update modules/logging/filters.go Co-authored-by: Francis Lavoie --- modules/logging/filters.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/logging/filters.go b/modules/logging/filters.go index 76143134f624..e615d0bea83c 100644 --- a/modules/logging/filters.go +++ b/modules/logging/filters.go @@ -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"`