mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix package.json
Also back out auth changes
This commit is contained in:
parent
0e4787f3e8
commit
9db9b53c81
@ -48,7 +48,7 @@
|
||||
"fs.notify": "0.0.4",
|
||||
"got": "11.8.2",
|
||||
"hash-sum": "2.0.0",
|
||||
"hpagent": "0.1.2",
|
||||
"hpagent": "^0.1.2",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"i18next": "20.3.2",
|
||||
"iconv-lite": "0.6.3",
|
||||
|
@ -207,17 +207,23 @@ module.exports = function(RED) {
|
||||
}
|
||||
if (this.credentials) {
|
||||
if (this.authType === "basic") {
|
||||
// Workaround for https://github.com/sindresorhus/got/issues/1169
|
||||
var cred = ""
|
||||
var parsedURL = new URL(url)
|
||||
if (this.credentials.user) {
|
||||
opts.username = this.credentials.user;
|
||||
// opts.username = this.credentials.user;
|
||||
cred = this.credentials.user
|
||||
} else if (parsedURL.username) {
|
||||
opts.username = parsedURL.username
|
||||
cred = parsedURL.username
|
||||
}
|
||||
if (this.credentials.password) {
|
||||
opts.password = this.credentials.password;
|
||||
// opts.password = this.credentials.password;
|
||||
cred += ":" + this.credentials.password
|
||||
} else if (parsedURL.password) {
|
||||
opts.password = parsedURL.password
|
||||
cred += ":" + parsedURL.password
|
||||
}
|
||||
// build own basic auth header
|
||||
opts.headers.Authorization = "Basic " + Buffer.from(cred).toString("base64");
|
||||
} else if (this.authType === "digest") {
|
||||
let digestCreds = this.credentials;
|
||||
let sentCreds = false;
|
||||
|
@ -31,7 +31,7 @@
|
||||
"fs.notify": "0.0.4",
|
||||
"got": "11.8.2",
|
||||
"hash-sum": "2.0.0",
|
||||
"hpagent": "0.1.1",
|
||||
"hpagent": "^0.1.2",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"is-utf8": "0.2.1",
|
||||
"js-yaml": "3.14.0",
|
||||
|
Loading…
Reference in New Issue
Block a user