From 9b5dfd53fe97ecb6957c62e933d6a7e374c274e7 Mon Sep 17 00:00:00 2001 From: Italo Castilho Date: Fri, 8 Dec 2017 17:21:03 -0200 Subject: [PATCH] Adding ES protocol configuration for https auth --- app.js | 3 ++- config.example.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index ada2178..00ec1f0 100644 --- a/app.js +++ b/app.js @@ -14,7 +14,8 @@ var escOptions = { hosts: [{ host: conf.ES_HOST, port: conf.ES_PORT, - auth: (conf.ES_USER && conf.ES_PASS) ? conf.ES_USER + ':' + conf.ES_PASS : null + auth: (conf.ES_USER && conf.ES_PASS) ? conf.ES_USER + ':' + conf.ES_PASS : null, + protocol: conf.ES_PROTOCOL }] }; diff --git a/config.example.js b/config.example.js index 96adba0..e301404 100644 --- a/config.example.js +++ b/config.example.js @@ -40,6 +40,9 @@ else { // ElasticSearch password for http auth exports.ES_PASS = process.env.ES_PASS || null; + + // ElasticSearch protocol for http auth + exports.ES_PROTOCOL = process.env.ES_PROTOCOL || 'http'; } /** Paths to Monitor