File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Public fetch/proxy helpers for plugins that need wrapped fetch behavior.
22
3+ import type { GuardedFetchOptions } from "../infra/net/fetch-guard.js" ;
4+
35export { resolveFetch , wrapFetchWithAbortSignal } from "../infra/fetch.js" ;
46export {
57 createHttp1EnvHttpProxyAgent ,
68 createHttp1ProxyAgent ,
79} from "../infra/net/undici-runtime.js" ;
8- export { withTrustedEnvProxyGuardedFetchMode } from "../infra/net/fetch-guard.ts" ;
910export {
1011 addActiveManagedProxyTlsOptions ,
1112 resolveActiveManagedProxyTlsOptions ,
@@ -24,3 +25,14 @@ export {
2425export { getProxyUrlFromFetch , makeProxyFetch } from "../infra/net/proxy-fetch.js" ;
2526export { createPinnedLookup } from "../infra/net/ssrf.js" ;
2627export type { PinnedDispatcherPolicy } from "../infra/net/ssrf.js" ;
28+
29+ type GuardedFetchPresetOptions = Omit <
30+ GuardedFetchOptions ,
31+ "mode" | "proxy" | "dangerouslyAllowEnvProxyWithoutPinnedDns"
32+ > ;
33+
34+ export function withTrustedEnvProxyGuardedFetchMode (
35+ params : GuardedFetchPresetOptions ,
36+ ) : GuardedFetchOptions {
37+ return { ...params , mode : "trusted_env_proxy" } ;
38+ }
You can’t perform that action at this time.
0 commit comments