-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
When talking to AWS Elasticsearch: Error occurred while preparing to ship data: { [Error: Content-Type header [application/x-ldjson] is not supported]. This is with elasticsearch.js 11.0.1.
application/json works fine. It's just a question of how to get lambda-stash to do it. I tried changing shipElasticsearch.js to set the headers, but it didn't work:
var esConfig = {
host: config.elasticsearch.host,
requestTimeout: config.elasticsearch.requestTimeout,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
For now, I've modified the bottom of node_modules/elasticsearch/src/lib/serializers/json.js to use application/json.
Metadata
Metadata
Assignees
Labels
No labels