mirror of https://github.com/node-red/node-red.git
Prevent Overwite of configured creds
This commit is contained in:
parent
81f0fb3c74
commit
32dd186f4d
|
@ -206,10 +206,11 @@ module.exports = function(RED) {
|
|||
}
|
||||
}
|
||||
var parsedURL = new URL(url)
|
||||
if (parsedURL.username) {
|
||||
this.credentials = this.credentials || {}
|
||||
if (parsedURL.username && !this.credentials.user) {
|
||||
this.credentials.user = parsedURL.username
|
||||
}
|
||||
if (parsedURL.password) {
|
||||
if (parsedURL.password && !this.credentials.password) {
|
||||
this.credentials.password = parsedURL.password
|
||||
}
|
||||
if (Object.keys(this.credentials).length != 0) {
|
||||
|
|
Loading…
Reference in New Issue