From 46ccaf01e70fe89cc0c788ed13582e65b9959869 Mon Sep 17 00:00:00 2001 From: Danny Cao Date: Thu, 5 Dec 2019 10:45:42 -0500 Subject: [PATCH] [FAB-15035] Remove couchdb HTTP Request headers from debug log * This was printing out basic auth credentials and is probably unnecessary to log in the first place Signed-off-by: Danny Cao --- core/ledger/util/couchdb/couchdb.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/ledger/util/couchdb/couchdb.go b/core/ledger/util/couchdb/couchdb.go index cf721bc0d8b..5d4483fff19 100644 --- a/core/ledger/util/couchdb/couchdb.go +++ b/core/ledger/util/couchdb/couchdb.go @@ -1822,12 +1822,6 @@ func (couchInstance *CouchInstance) handleRequest(ctx context.Context, method, d req.SetBasicAuth(couchInstance.conf.Username, couchInstance.conf.Password) } - if logger.IsEnabledFor(zapcore.DebugLevel) { - dump, _ := httputil.DumpRequestOut(req, false) - // compact debug log by replacing carriage return / line feed with dashes to separate http headers - logger.Debugf("HTTP Request: %s", bytes.Replace(dump, []byte{0x0d, 0x0a}, []byte{0x20, 0x7c, 0x20}, -1)) - } - //Execute http request resp, errResp = couchInstance.client.Do(req)