From 2a1e470d47098a98b752abf0f06fb15cff8b83d0 Mon Sep 17 00:00:00 2001 From: Christian Mueller Date: Sun, 25 Mar 2018 12:04:50 +0200 Subject: [PATCH] fixed the failed ES upload - ES is returning an HTTP status code 406 --- ElasticSearchLambda/ZombieWorkshopSearchIndexing.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ElasticSearchLambda/ZombieWorkshopSearchIndexing.js b/ElasticSearchLambda/ZombieWorkshopSearchIndexing.js index 9bf7442..5112da4 100644 --- a/ElasticSearchLambda/ZombieWorkshopSearchIndexing.js +++ b/ElasticSearchLambda/ZombieWorkshopSearchIndexing.js @@ -47,6 +47,7 @@ function postToES(doc, context) { req.path = path.join('/', esDomain.index, esDomain.doctype); req.region = esDomain.region; req.headers['presigned-expires'] = false; + req.headers['Content-Type'] = 'application/json'; req.headers['Host'] = endpoint.host; req.body = doc;