easrngE
Denoβ€’11mo ago
easrng

Is there a way to handle permission prompts from a worker?

I would like to give a worker net/import access to any public IP over https, without giving it the ability to bind to any address or access private IP addresses. The docstring for the
net
property on the
deno.permissions
worker option says
if set to string[], the net permission will be requested with the specified host strings with the format "<host>[:<port>]."
, and hooking that seems like the easiest way to do this kind of permission filtering logic, but I can't figure out how to.
Was this page helpful?