Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion internal/worker/direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ const defaultWorkspaceRoot = "/var/lib/oz/workspaces"
// defaultInheritedEnvVars are the host environment variables passed through to
// tasks and scripts by default. Sensitive worker credentials are intentionally
// excluded; additional variables can be opted in via the backend config.
var defaultInheritedEnvVars = []string{"HOME", "TMPDIR", "PATH"}
// Proxy variables are included so the oz CLI can route traffic through HTTP
// proxies configured on the host (e.g. egress proxies in restricted networks).
var defaultInheritedEnvVars = []string{
"HOME", "TMPDIR", "PATH",
// HTTP proxy configuration (both cases for portability).
"HTTPS_PROXY", "https_proxy",
"HTTP_PROXY", "http_proxy",
"ALL_PROXY", "all_proxy",
"NO_PROXY", "no_proxy",
}

// hostBaseEnv builds a minimal env slice from the host, containing only the
// keys listed in defaultInheritedEnvVars.
Expand Down
Loading