You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: with outbound set, npm and Node can't reach any HTTPS host from executor() commands #342
When outbound returns a Fetcher, Node-based tools in the container can't make HTTPS requests. npm install fails with SELF_SIGNED_CERT_IN_CHAIN, after about 70 s of retries, and fetch fails with "self-signed certificate in certificate chain". So routing a container's egress breaks npm, pnpm and any Node script that makes requests, even when the Fetcher only passes requests through. The requests never reach the Fetcher.
Cause:ContainerExec adds CA_ENV to the env it passes to ctx.container.start(). That env reaches only the container's entrypoint. Commands run through ctx.container.exec() don't inherit it, and ContainerExec.exec() doesn't add it, so Node never gets NODE_EXTRA_CA_CERTS.
Fix: merge CA_ENV into each exec()'s env while the container is routed.
Evidence (0.11.4, cloudflare/debian-trixie, standard-4, outbound returning an entrypoint whose fetch is return fetch(request)):
Result
npm install left-pad
SELF_SIGNED_CERT_IN_CHAIN after ~70 s, 2 of 2 runs, no requests at the entrypoint
The same, with NODE_EXTRA_CA_CERTS=/etc/cloudflare/certs/cloudflare-containers-ca.crt on the command
succeeds in 3 s, all requests through the entrypoint
Cause: the CA_ENV variables reached only the container's entrypoint through start(), and ContainerExec.exec() never added them, so Node commands lacked NODE_EXTRA_CA_CERTS.
Change: exec() merges CA_ENV into each command's env while the container is routed through an egress.
Activity
github-actions commentedon Nov 24, 2026
I've opened a fix: #343
CA_ENVvariables reached only the container's entrypoint throughstart(), andContainerExec.exec()never added them, so Node commands lackedNODE_EXTRA_CA_CERTS.exec()mergesCA_ENVinto each command's env while the container is routed through an egress.