Remove auth data from inspect and toJSON in connection class (#887)

* Remove auth data from inspect and toJSON in connection class

* Updated test
This commit is contained in:
Tomas Della Vedova
2019-07-04 13:56:06 +02:00
committed by GitHub
parent d00564722e
commit 1a3dbeb94b
2 changed files with 33 additions and 18 deletions

View File

@ -231,7 +231,7 @@ class Connection {
// access them with `instance.agent` and `instance.ssl`.
[inspect.custom] (depth, options) {
return {
url: this.url,
url: stripAuth(this.url.toString()),
id: this.id,
headers: this.headers,
deadCount: this.deadCount,
@ -244,7 +244,7 @@ class Connection {
toJSON () {
return {
url: this.url,
url: stripAuth(this.url.toString()),
id: this.id,
headers: this.headers,
deadCount: this.deadCount,