[Backport 8.1] Update docs for v8 (#1620)

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2022-02-11 10:23:54 +01:00
committed by GitHub
parent 84d8b68007
commit 3e6b02b504
37 changed files with 315 additions and 1264 deletions

View File

@ -32,7 +32,7 @@ Or it can be an object (or an array of objects) that represents the node:
----
node: {
url: new URL('http://localhost:9200'),
ssl: 'ssl options',
tls: 'tls options',
agent: 'http agent options',
id: 'custom node id',
headers: { 'custom': 'headers' }
@ -118,8 +118,8 @@ _Default:_ `false`
_Options:_ `'gzip'`, `false` +
_Default:_ `false`
|`ssl`
|`http.SecureContextOptions` - ssl https://nodejs.org/api/tls.html[configuraton]. +
|`tls`
|`http.SecureContextOptions` - tls https://nodejs.org/api/tls.html[configuraton]. +
_Default:_ `null`
|`proxy`
@ -267,24 +267,4 @@ _Default:_ `null`
|`number` - When configured, it verifies that the compressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_LENTGH +
_Default:_ `null`
|===
[discrete]
==== Performances considerations
By default, the client will protection you against prototype poisoning attacks.
Read https://web.archive.org/web/20200319091159/https://hueniverse.com/square-brackets-are-the-enemy-ff5b9fd8a3e8?gi=184a27ee2a08[this article] to learn more.
If needed you can disable prototype poisoning protection entirely or one of the two checks.
Read the `secure-json-parse` https://github.com/fastify/secure-json-parse[documentation] to learn more.
While it's good to be safe, you should know that security always comes with a cost.
With big enough payloads, this security check could causea drop in the overall performances,
which might be a problem for your application.
If you know you can trust the data stored in Elasticsearch, you can safely disable this check.
[source,js]
----
const client = new Client({
disablePrototypePoisoningProtection: true
})
----
|===