Restrict outgoing worker traffic with whitelist

Hello,
Is it possible to restrict outgoing worker traffic ? Something like a firewall after the worker
I'd like to block all requests (http fetch, websocket..) except those made to specific authorized domains which i whitelisted earlier (on the cloudflare dashboard for example). The idea is to prevent any lib added to my worker from making request I'm not aware of and therefore prevent any potential data leak in the future.
thanks !
Was this page helpful?