MCPcopy
hub / github.com/vercel/next.js / getProxyAgent

Function getProxyAgent

packages/font/src/google/get-proxy-agent.ts:10–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8 * If the http(s)_proxy environment variables is set, return a proxy agent.
9 */
10export function getProxyAgent(): Agent | undefined {
11 const httpsProxy = process.env['https_proxy'] || process.env['HTTPS_PROXY']
12 if (httpsProxy) {
13 return new HttpsProxyAgent(httpsProxy)
14 }
15
16 const httpProxy = process.env['http_proxy'] || process.env['HTTP_PROXY']
17 if (httpProxy) {
18 return new HttpProxyAgent(httpProxy)
19 }
20}

Callers 1

fetchResourceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected