Skip to content

Commit 7871a7f

Browse files
authored
fix: use 'host' instead of 'hostname' for --allow-net docs (#3036)
1 parent ea33c1c commit 7871a7f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

runtime/fundamentals/security.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ or perform DNS resolution. This includes making HTTP requests, opening TCP/UDP
247247
sockets, and listening for incoming connections on TCP or UDP.
248248

249249
Network access is granted using the `--allow-net` flag. This flag can be
250-
specified with a list of IP addresses or hostnames to allow access to specific
251-
network addresses.
250+
specified with a list of hosts to allow access to specific network addresses. A
251+
host can be a hostname or IP address, optionally with a port.
252252

253253
Hostnames do not allow subdomains, unless explicitly listed. To allow any
254254
subdomain for a hostname, `*` can be used as wildcard for any subdomain.
255255

256-
Definition: `--allow-net[=<IP_OR_HOSTNAME>...]` or `-N[=<IP_OR_HOSTNAME>...]`
256+
Definition: `--allow-net[=<HOST>...]` or `-N[=<HOST>...]`
257257

258258
```sh
259259
# Allow network access
@@ -277,7 +277,7 @@ deno run --allow-net=1.1.1.1:443 script.ts
277277
deno run --allow-net=[2606:4700:4700::1111] script.ts
278278
```
279279

280-
Definition: `--deny-net[=<IP_OR_HOSTNAME>...]`
280+
Definition: `--deny-net[=<HOST>...]`
281281

282282
```sh
283283
# Allow access to network, but deny access

0 commit comments

Comments
 (0)