diff --git a/packages/node_modules/@node-red/nodes/core/network/21-httprequest.js b/packages/node_modules/@node-red/nodes/core/network/21-httprequest.js index e9bf49d68..f5054eb81 100644 --- a/packages/node_modules/@node-red/nodes/core/network/21-httprequest.js +++ b/packages/node_modules/@node-red/nodes/core/network/21-httprequest.js @@ -302,6 +302,8 @@ in your Node-RED user directory (${RED.settings.userDir}). // var cred = "" if (this.credentials.user || this.credentials.password) { // cred = `${this.credentials.user}:${this.credentials.password}`; + if (this.credentials.user === undefined) { this.credentials.user = ""} + if (this.credentials.password === undefined) { this.credentials.password = ""} opts.headers.Authorization = "Basic " + Buffer.from(`${this.credentials.user}:${this.credentials.password}`).toString("base64"); } // build own basic auth header