mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Merge pull request #1262 from tirongi/feature/elasticCustomURLBasicAuth
Enable inserting custom URL using basic auth
This commit is contained in:
@@ -11,8 +11,8 @@ class ElasticSearchUserPassword implements INodeCredential {
|
|||||||
this.label = 'ElasticSearch User Password'
|
this.label = 'ElasticSearch User Password'
|
||||||
this.name = 'elasticSearchUserPassword'
|
this.name = 'elasticSearchUserPassword'
|
||||||
this.version = 1.0
|
this.version = 1.0
|
||||||
this.description =
|
this.description = `Use Cloud ID field to enter your Elastic Cloud ID or the URL of the Elastic server instance.
|
||||||
'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/elasticsearch/reference/current/setting-up-authentication.html">official guide</a> on how to get User Password from ElasticSearch.`
|
||||||
this.inputs = [
|
this.inputs = [
|
||||||
{
|
{
|
||||||
label: 'Cloud ID',
|
label: 'Cloud ID',
|
||||||
|
|||||||
@@ -144,13 +144,26 @@ 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: {
|
elasticSearchClientOptions = {
|
||||||
id: cloudId
|
node: cloudId,
|
||||||
},
|
auth: {
|
||||||
auth: {
|
username: username,
|
||||||
username: username,
|
password: password
|
||||||
password: password
|
},
|
||||||
|
tls: {
|
||||||
|
rejectUnauthorized: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
elasticSearchClientOptions = {
|
||||||
|
cloud: {
|
||||||
|
id: cloudId
|
||||||
|
},
|
||||||
|
auth: {
|
||||||
|
username: username,
|
||||||
|
password: password
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user