MCPcopy
hub / github.com/axios/axios / isNodeEnvProxyEnabled

Function isNodeEnvProxyEnabled

lib/adapters/http.js:120–132  ·  view source on GitHub ↗
(agent, nodeVersion = process.versions && process.versions.node)

Source from the content-addressed store, hash-verified

118}
119
120function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
121 if (!isNodeNativeEnvProxySupported(nodeVersion)) {
122 return false;
123 }
124
125 const agentOptions = agent && agent.options;
126
127 return Boolean(
128 agentOptions &&
129 utils.hasOwnProp(agentOptions, 'proxyEnv') &&
130 agentOptions.proxyEnv != null
131 );
132}
133
134function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
135 return isHttps.test(options.protocol)

Callers 1

setProxyFunction · 0.85

Calls 1

Tested by

no test coverage detected