mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Enable inserting custom URL using basic auth
This commit is contained in:
@@ -15,7 +15,7 @@ class ElasticSearchUserPassword implements INodeCredential {
|
|||||||
'Refer to <a target="_blank" href="https://www.elastic.co/guide/en/kibana/current/tutorial-secure-access-to-kibana.html">official guide</a> on how to get User Password from ElasticSearch'
|
'Refer to <a target="_blank" href="https://www.elastic.co/guide/en/kibana/current/tutorial-secure-access-to-kibana.html">official guide</a> on how to get User Password from ElasticSearch'
|
||||||
this.inputs = [
|
this.inputs = [
|
||||||
{
|
{
|
||||||
label: 'Cloud ID',
|
label: 'Cloud ID or custom server URL',
|
||||||
name: 'cloudId',
|
name: 'cloudId',
|
||||||
type: 'string'
|
type: 'string'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -144,15 +144,30 @@ export abstract class ElasticSearchBase {
|
|||||||
} else if (cloudId) {
|
} else if (cloudId) {
|
||||||
let username = getCredentialParam('username', credentialData, nodeData)
|
let username = getCredentialParam('username', credentialData, nodeData)
|
||||||
let password = getCredentialParam('password', credentialData, nodeData)
|
let password = getCredentialParam('password', credentialData, nodeData)
|
||||||
elasticSearchClientOptions = {
|
if (cloudId.startsWith('http')) {
|
||||||
cloud: {
|
let username = getCredentialParam('username', credentialData, nodeData)
|
||||||
id: cloudId
|
let password = getCredentialParam('password', credentialData, nodeData)
|
||||||
},
|
elasticSearchClientOptions = {
|
||||||
auth: {
|
node: cloudId,
|
||||||
username: username,
|
auth: {
|
||||||
password: password
|
username: username,
|
||||||
|
password: password
|
||||||
|
},
|
||||||
|
tls: {
|
||||||
|
rejectUnauthorized: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} else{
|
||||||
|
elasticSearchClientOptions = {
|
||||||
|
cloud: {
|
||||||
|
id: cloudId
|
||||||
|
},
|
||||||
|
auth: {
|
||||||
|
username: username,
|
||||||
|
password: password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return elasticSearchClientOptions
|
return elasticSearchClientOptions
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user