Skip to content

Commit

Permalink
fix(http): fixed proxy-from-env module import (axios#5222)
Browse files Browse the repository at this point in the history
Co-authored-by: Pavan Welihinda <[email protected]>
Co-authored-by: Dmitriy Mozgovoy <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent fc6fa69 commit 12b3295
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/adapters/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 12b3295

Please sign in to comment.