diff --git a/lib/adapters/http.js b/lib/adapters/http.js index c6c603f..da0a42d 100755 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -4,7 +4,7 @@ import utils from './../utils.js'; import settle from './../core/settle.js'; import buildFullPath from '../core/buildFullPath.js'; import buildURL from './../helpers/buildURL.js'; -import {getProxyForUrl} from 'proxy-from-env'; +import proxyFromEnv from 'proxy-from-env'; import http from 'http'; import https from 'https'; import util from 'util'; @@ -83,7 +83,7 @@ function dispatchBeforeRedirect(options, responseDetails) { function setProxy(options, configProxy, location) { let proxy = configProxy; if (!proxy && proxy !== false) { - const proxyUrl = getProxyForUrl(location); + const proxyUrl = proxyFromEnv.getProxyForUrl(location); if (proxyUrl) { proxy = new URL(proxyUrl); }