Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Elasticsearch does not accept application/x-ldjson #20

Open
garrickstapleszed opened this issue Jan 23, 2018 · 0 comments
Open

AWS Elasticsearch does not accept application/x-ldjson #20

garrickstapleszed opened this issue Jan 23, 2018 · 0 comments

Comments

@garrickstapleszed
Copy link
Contributor

garrickstapleszed commented Jan 23, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant