Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ea2c8d2d4d
commit
28d8ff799e
4
index.js
4
index.js
@ -116,6 +116,10 @@ class Client extends ESAPI {
|
||||
disablePrototypePoisoningProtection: false
|
||||
}, opts)
|
||||
|
||||
if (process.env.ELASTIC_CLIENT_APIVERSIONING === 'true') {
|
||||
options.headers = Object.assign({ accept: 'application/vnd.elasticsearch+json; compatible-with=7' }, options.headers)
|
||||
}
|
||||
|
||||
this[kInitialOptions] = options
|
||||
this[kExtensions] = []
|
||||
this.name = options.name
|
||||
|
||||
Reference in New Issue
Block a user