(agent, nodeVersion = process.versions && process.versions.node)
| 118 | } |
| 119 | |
| 120 | function 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 | |
| 134 | function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) { |
| 135 | return isHttps.test(options.protocol) |
no test coverage detected