Skip to content

Commit

Permalink
Add ssl to elasticsearch config settings (#5527)
Browse files Browse the repository at this point in the history
  • Loading branch information
noellabo authored and syuilo committed Oct 20, 2019
1 parent f180f02 commit 97b6af6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export type Source = {
port: number;
pass: string;
index?: string;
ssl?: boolean;
};

autoAdmin?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/db/elasticsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const index = {

// Init ElasticSearch connection
const client = config.elasticsearch ? new elasticsearch.Client({
node: `http://${config.elasticsearch.host}:${config.elasticsearch.port}`,
node: `${config.elasticsearch.ssl ? 'https://' : 'http://'}${config.elasticsearch.host}:${config.elasticsearch.port}`,
pingTimeout: 30000
}) : null;

Expand Down
Empty file.

0 comments on commit 97b6af6

Please sign in to comment.