Skip to content

Commit

Permalink
[FAB-15035] Remove couchdb HTTP Request headers from debug log
Browse files Browse the repository at this point in the history
* This was printing out basic auth credentials and is probably unnecessary to log
in the first place

Signed-off-by: Danny Cao <dcao@us.ibm.com>
  • Loading branch information
caod123 authored and mastersingh24 committed Dec 6, 2019
1 parent 1b8be06 commit 46ccaf0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/ledger/util/couchdb/couchdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 46ccaf0

Please sign in to comment.