Decide whether network access is appropriate
Do not use worker network access for:- secrets or credentials;
- OAuth flows;
- private endpoints;
- private API tokens;
- webhooks or background work.
Declare the capability
ImportnetworkAccess from the public worker facade and add it to the widget’s uses array.
Understand approval
A portal author must approve the exact package ID, package version, and capability version. Changing any of those values makes the prior grant stale. Interactive portal push requests approval. For a reviewed non-interactive push, use--allow-network-widgets. The general --yes flag does not grant network access.
Understand the request boundary
Granted fetch uses the worker’s native origin. Fluid does not add credentials, cookies, tokens, or headers. YourRequestInit, including credential mode, remains in effect.
A widget can send portal data it receives to an external service. Review both the package and its destinations before approval.