1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

HTTP In node: Check credentials exist before using

This commit is contained in:
Nick O'Leary 2014-07-22 11:33:52 +01:00
parent 0b308deb79
commit bead24e760

View File

@ -169,7 +169,7 @@ module.exports = function(RED) {
opts.headers[v.toLowerCase()] = msg.headers[v];
}
}
if (this.credentials.user) {
if (this.credentials && this.credentials.user) {
opts.auth = this.credentials.user+":"+(this.credentials.password||"");
}
var payload = null;