mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Treat elasticsearch.ssl.certificateAuthorities
as an optional field in Console ES proxy. (#32992)
This commit is contained in:
parent
1810c68625
commit
1c2481080e
2 changed files with 3 additions and 2 deletions
|
@ -31,7 +31,7 @@ const getDefaultElasticsearchConfig = () => {
|
|||
return {
|
||||
hosts: ['http://localhost:9200', 'http://192.168.1.1:1234'],
|
||||
requestTimeout: moment.duration(30000),
|
||||
ssl: { certificateAuthorities: [], verificationMode: 'full' },
|
||||
ssl: { verificationMode: 'full' },
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@ const createAgent = (legacyConfig) => {
|
|||
throw new Error(`Unknown ssl verificationMode: ${verificationMode}`);
|
||||
}
|
||||
|
||||
if (legacyConfig.ssl && legacyConfig.ssl.certificateAuthorities.length > 0) {
|
||||
if (legacyConfig.ssl && Array.isArray(legacyConfig.ssl.certificateAuthorities)
|
||||
&& legacyConfig.ssl.certificateAuthorities.length > 0) {
|
||||
agentOptions.ca = legacyConfig.ssl.certificateAuthorities.map(readFile);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue