mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-21 04:12:08 +03:00
fix(cli): keep loopback requests off environment proxies (#60441)
Co-authored-by: r266-tech <r266-tech@users.noreply.github.com> Co-authored-by: pj.reid <pj.reid@zetier.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
ef712d3a78
commit
78dda62d88
@@ -19,6 +19,19 @@ import { Heap } from "./heap"
|
||||
import { CpuProfile } from "./cpu-profile"
|
||||
import { ShutdownDeadline } from "./shutdown-deadline"
|
||||
|
||||
// Keep requests to the local service off any proxy. Bun reads lowercase `no_proxy` alone whenever it is set, so both
|
||||
// spellings get the same merged list.
|
||||
const noProxy = [
|
||||
...new Set(
|
||||
[process.env.NO_PROXY, process.env.no_proxy, "127.0.0.1,localhost,::1"].flatMap((value) =>
|
||||
(value ?? "").split(",").flatMap((entry) => entry.trim() || []),
|
||||
),
|
||||
),
|
||||
].join(",")
|
||||
|
||||
process.env.NO_PROXY = noProxy
|
||||
process.env.no_proxy = noProxy
|
||||
|
||||
ensurePluginRuntime()
|
||||
|
||||
if (process.env.OPENCODE_SSH_ASKPASS_PORT) {
|
||||
|
||||
Reference in New Issue
Block a user