Deno permissions (--allow-net)
Asked Answered
U

2

9

How to give global permission to all websites (for debugging stuff) in my deno project like..

deno run --allow-net=* deno.ts

or something like that

Unlimber answered 14/5, 2020 at 20:9 Comment(0)
B
20

Just use --allow-net without anything else.

Unless you specify something, you will give permission to all network calls.

# All requests allowed
deno run --allow-net deno.ts

# only calls to stackoverflow.com
deno run --allow-net=stackoverflow.com deno.ts

The same goes for all the other permissions.

Befool answered 14/5, 2020 at 20:13 Comment(0)
H
3

It is possible to allow urls from either one domain or multiple domains.

# For one domain permission: 
  deno run --allow-net=xyz.com

# For multiple domains, give comma separated values: 
  deno run --allow-net=xyz.com,abc.com

adding xyz.com/api/v1/user/ and protocols like http, are not needed.

Haemoid answered 6/1, 2021 at 17:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.