DenoDDeno
Powered by
easrngE
Denoβ€’13mo 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
net
property on the
deno.permissions
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>]."
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.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Is there any way to trace where permissions prompts are coming from?
Tim FishTTim Fish / help
4y ago
Is there a way to handle subpath imports within a library?
DanDDan / help
2y ago
Is there a way to set the globalThis.location for a Worker
Mark GMMark G / help
8mo ago