File tree 2 files changed +1
-13
lines changed
2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,7 @@ async function handler (req, res) {
26
26
27
27
const docTarget = req . params . target || false
28
28
29
- let streams
30
- if (
31
- req . headers [ 'content-type' ] &&
32
- req . headers [ 'content-type' ] . indexOf ( 'application/x-ndjson' ) > - 1
33
- ) {
34
- // ndjson body
35
- streams = req . body . split ( / \n / )
36
- } else {
37
- // assume ndjson raw body
38
- streams = req . body . split ( / \n / )
39
- }
29
+ const streams = req . body . split ( / \n / )
40
30
let lastTags = false
41
31
const promises = [ ]
42
32
if ( streams ) {
Original file line number Diff line number Diff line change @@ -243,11 +243,9 @@ let fastify = require('fastify')({
243
243
} )
244
244
const handlerElasticBulk = require ( './lib/handlers/elastic_bulk.js' ) . bind ( this )
245
245
writerMode && fastify . post ( '/_bulk' , handlerElasticBulk , {
246
- 'application/json' : jsonParser ,
247
246
'*' : rawStringParser
248
247
} )
249
248
writerMode && fastify . post ( '/:target/_bulk' , handlerElasticBulk , {
250
- 'application/json' : jsonParser ,
251
249
'*' : rawStringParser
252
250
} )
253
251
You can’t perform that action at this time.
0 commit comments