Skip to content

Commit a388562

Browse files
committed
Adds DNS over HTTPS text
1 parent ae95ec6 commit a388562

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/content/changelogs-next/2025-01-22-nodejs-compat-improvements.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Support for Node.js DNS, Net, and Timer APIs in Workers
33
description: Node.js APIs from the node:dns, node:net, and node:timers modules are now available when using nodejs_compat.
44
products:
55
- workers
6-
- pages
76
date: 2025-01-22T13:00:00Z
87
---
98

@@ -53,15 +52,15 @@ Note that [`net.Server`](https://nodejs.org/api/net.html#class-netserver) is not
5352

5453
#### node:dns
5554

56-
You can use [`node:dns`](https://nodejs.org/api/dns.html) for name resolution via DNS lookups using
55+
You can use [`node:dns`](https://nodejs.org/api/dns.html) for name resolution via [DNS over HTTPS](/1.1.1.1/encryption/dns-over-https/) using
5756
[Cloudflare DNS](https://www.cloudflare.com/application-services/products/dns/) at 1.1.1.1.
5857

5958
<TypeScriptExample filename="index.ts">
6059
```ts
6160
import dns from "node:dns";
6261
6362
dns.lookup("example.org", (_err: any, address: string, ipFamily: number) =>
64-
console.log(`address: ${address} family: IPv${ipFamily}`);
63+
console.log(`address: ${address} family: IPv${ipFamily}`));
6564
````
6665
6766
</TypeScriptExample>

src/content/docs/workers/runtime-apis/nodejs/dns.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ import { Render, TypeScriptExample } from "~/components";
77

88
<Render file="nodejs-compat-howto" />
99

10-
You can use [`node:dns`](https://nodejs.org/api/dns.html) for name resolution via DNS lookups using
10+
You can use [`node:dns`](https://nodejs.org/api/dns.html) for name resolution via [DNS over HTTPS](/1.1.1.1/encryption/dns-over-https/) using
1111
[Cloudflare DNS](https://www.cloudflare.com/application-services/products/dns/) at 1.1.1.1.
1212

1313
<TypeScriptExample filename="index.ts">
1414
```ts
1515
import dns from "node:dns";
1616

1717
dns.lookup("example.org", (_err: any, address: string, ipFamily: number) =>
18-
console.log(`address: ${address} family: IPv${ipFamily}`);
19-
});
18+
console.log(`address: ${address} family: IPv${ipFamily}`));
2019
```
2120
</TypeScriptExample>
2221

0 commit comments

Comments
 (0)