SandboxNetworkPolicy
September 16, 2026 ยท View on GitHub
The network policy applied to this sandbox, if any.
Example Usage
import { SandboxNetworkPolicy } from "@vercel/sdk/models/sandboxnetworkpolicy.js";
let value: SandboxNetworkPolicy = {
allowedCIDRs: [
"10.0.0.0/8",
],
allowedDomains: [
"api.vercel.com",
"*.example.com",
],
deniedCIDRs: [
"10.0.0.0/8",
],
injectionRules: [
{
domain: "api.vercel.com",
headerNames: [
"Authorization",
"X-API-Key",
],
},
],
mode: "custom",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
allowedCIDRs | string[] | :heavy_minus_sign: | List of IP address ranges (in CIDR notation) the sandbox is allowed to connect to. | [ "10.0.0.0/8" ] |
allowedDomains | string[] | :heavy_minus_sign: | List of domain names the sandbox is allowed to connect to. Supports wildcard patterns (e.g., "*.vercel.com" matches all subdomains). | [ "api.vercel.com", "*.example.com" ] |
deniedCIDRs | string[] | :heavy_minus_sign: | List of IP address ranges (in CIDR notation) the sandbox is blocked from connecting to. These rules take precedence over all allowed rules. | [ "10.0.0.0/8" ] |
injectionRules | models.SandboxInjectionRule[] | :heavy_minus_sign: | HTTP header injection rules for outgoing requests matching specific domains. | |
mode | models.Mode | :heavy_check_mark: | The network policy mode. - 'allow-all': All traffic is allowed. - 'deny-all': All traffic is blocked. - 'custom': Traffic is controlled by explicit allow/deny rules. | custom |