diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2020-01-29 15:12:15 +0300 |
---|---|---|
committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-09-12 22:05:35 +0300 |
commit | 1b2749ecbe3038eab4ac12945ef8f036cb58d4bd (patch) | |
tree | ffc930491ed3189f00869afd1e8a52b32326652b /doc | |
parent | b6ac7e6919b06ab604cc11c45f190b36c95c727f (diff) |
dns: default to verbatim=true in dns.lookup()
Switch the default from `ipv4first` to `verbatim` (return them exactly
as the resolver sent them to us).
PR-URL: https://github.com/nodejs/node/pull/39987
Fixes: https://github.com/nodejs/node/issues/31566
Refs: https://github.com/nodejs/node/issues/6307
Refs: https://github.com/nodejs/node/pull/20710
Refs: https://github.com/nodejs/node/pull/38099
Co-authored-by: treysis <treysis@gmx.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/dns.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/api/dns.md b/doc/api/dns.md index af9bb60967e..ef90e15a04d 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -170,6 +170,9 @@ section if a custom port is used. <!-- YAML added: v0.1.90 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/39987 + description: The `verbatim` options defaults to `true` now. - version: v8.5.0 pr-url: https://github.com/nodejs/node/pull/14731 description: The `verbatim` option is supported now. @@ -190,10 +193,9 @@ changes: * `verbatim` {boolean} When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 addresses are placed before IPv6 addresses. - **Default:** currently `false` (addresses are reordered) but this is - expected to change in the not too distant future. Default value is + **Default:** `true` (addresses are reordered). Default value is configurable using [`dns.setDefaultResultOrder()`][] or - [`--dns-result-order`][]. New code should use `{ verbatim: true }`. + [`--dns-result-order`][]. * `callback` {Function} * `err` {Error} * `address` {string} A string representation of an IPv4 or IPv6 address. |