summaryrefslogtreecommitdiff
path: root/docs/getting_started
diff options
context:
space:
mode:
authorJavaScriptDude <tim.c.quinn@gmail.com>2020-05-21 06:54:09 -0400
committerGitHub <noreply@github.com>2020-05-21 12:54:09 +0200
commit0f1c66cb6da7b45ff98e6eda060537ea4510a3ea (patch)
tree61937c89ada69beea8f8e7216f31f14274db7535 /docs/getting_started
parent6f52ad9052a02f354011d2727b2ad4a3d73b08d5 (diff)
docs: update permissions docs (#5426)
Diffstat (limited to 'docs/getting_started')
-rw-r--r--docs/getting_started/permissions.md14
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/getting_started/permissions.md b/docs/getting_started/permissions.md
index 867658170..c5880225a 100644
--- a/docs/getting_started/permissions.md
+++ b/docs/getting_started/permissions.md
@@ -27,12 +27,22 @@ $ deno run --allow-read=/etc https://deno.land/std/examples/cat.ts /etc/passwd
`--allow-write` works the same as `--allow-read`.
-This example restricts network access by whitelisting the allowed hosts:
+### Network access:
+
+_fetch.ts_:
```ts
const result = await fetch("https://deno.land/");
```
+This is an example on how to whitelist hosts/urls:
+
+```shell
+$ deno run --allow-net=github.com,deno.land fetch.ts
+```
+
+Allow net calls to any host/url:
+
```shell
-$ deno run --allow-net=deno.land https://deno.land/std/examples/curl.ts https://deno.land/
+$ deno run --allow-net fetch.ts
```