flâneur — a map of the web's best reading

Safely inject credentials in HTTP headers with Vercel Sandbox - Vercel

vercel.com · 563 words · saved by 1 readers

Sandbox network policies now support HTTP header injection to prevent secrets exfiltration by untrusted code

Vercel Sandbox can now automatically inject HTTP headers into outbound requests from sandboxed code. This keeps API keys and tokens safely outside the sandbox VM boundary, so apps running inside the sandbox can call authenticated services without ever accessing the credentials. Header injection is configured as part of the network policy using transform . When the sandbox makes an HTTPS request to a matching domain, the firewall adds or replaces the specified headers before forwarding the request. 1 const sandbox = await Sandbox . create ( { 2 timeout : 300_000 , 3 networkPolicy : { 4 allow :

Explore this link on the map →

related reading