diff --git a/lib/node/http.js b/lib/node/http.js index d0e266e65..4f0a65b8a 100644 --- a/lib/node/http.js +++ b/lib/node/http.js @@ -803,7 +803,7 @@ class HTTPOptions { this.cors = false; this.prefix = null; - this.host = '127.0.0.1'; + this.host = 'localhost'; this.port = 8080; this.ssl = false; this.keyFile = null; @@ -890,7 +890,7 @@ class HTTPOptions { // Allow no-auth implicitly // if we're listening locally. if (!options.apiKey) { - if (this.host === '127.0.0.1' || this.host === '::1') + if (this.host === '127.0.0.1' || this.host === '::1' || this.host === 'localhost') this.noAuth = true; } diff --git a/lib/wallet/http.js b/lib/wallet/http.js index 8f375d272..3d0b8b201 100644 --- a/lib/wallet/http.js +++ b/lib/wallet/http.js @@ -1551,7 +1551,7 @@ class HTTPOptions { this.walletAuth = false; this.prefix = null; - this.host = '127.0.0.1'; + this.host = 'localhost'; this.port = 8080; this.ssl = false; this.keyFile = null; @@ -1659,7 +1659,7 @@ class HTTPOptions { // Allow no-auth implicitly // if we're listening locally. if (!options.apiKey) { - if (this.host === '127.0.0.1' || this.host === '::1') + if (this.host === '127.0.0.1' || this.host === '::1' || this.host === 'localhost') this.noAuth = true; }