diff --git a/middleware/param_logger.go b/middleware/param_logger.go index 0be98680a..c25d2f4a4 100644 --- a/middleware/param_logger.go +++ b/middleware/param_logger.go @@ -2,6 +2,7 @@ package middleware import ( "encoding/json" + "fmt" "mime/multipart" "net/url" "strings" @@ -143,5 +144,8 @@ func (pl parameterLogger) maskSecrets(form url.Values) url.Values { } } + fmt.Println(copy) + fmt.Println(pl.blacklist) + return copy } diff --git a/middleware/param_logger_test.go b/middleware/param_logger_test.go index 89aaa8c81..6a9d80c38 100644 --- a/middleware/param_logger_test.go +++ b/middleware/param_logger_test.go @@ -36,12 +36,12 @@ func Test_maskSecrets(t *testing.T) { func Test_maskSecretsCustom(t *testing.T) { r := require.New(t) - ParameterFilterBlackList = []string{ - "FirstName", "LastName", "MiddleName", + pl := parameterLogger{ + blacklist: []string{ + "FirstName", "LastName", "MiddleName", + }, } - pl := parameterLogger{} - filteredForm := pl.maskSecrets(url.Values{ "FirstName": []string{"Antonio"}, "MiddleName": []string{"José"},