mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
cfe201dbe1
commit
87af31de20
@ -302,11 +302,11 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
|||||||
var cred = ""
|
var cred = ""
|
||||||
if (this.credentials.user) {
|
if (this.credentials.user) {
|
||||||
// opts.username = this.credentials.user;
|
// opts.username = this.credentials.user;
|
||||||
cred = this.credentials.user
|
cred = this.credentials.user + ":"
|
||||||
}
|
}
|
||||||
if (this.credentials.password) {
|
if (this.credentials.password) {
|
||||||
// opts.password = this.credentials.password;
|
// opts.password = this.credentials.password;
|
||||||
cred += ":" + this.credentials.password
|
cred += this.credentials.password
|
||||||
}
|
}
|
||||||
// build own basic auth header
|
// build own basic auth header
|
||||||
opts.headers.Authorization = "Basic " + Buffer.from(cred).toString("base64");
|
opts.headers.Authorization = "Basic " + Buffer.from(cred).toString("base64");
|
||||||
|
Loading…
Reference in New Issue
Block a user