Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 12b3295

Browse filesBrowse files
pavan168Pavan WelihindaDigitalBrainJS
authored
fix(http): fixed proxy-from-env module import (#5222)
Co-authored-by: Pavan Welihinda <pavan@babyjourney.se> Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
1 parent fc6fa69 commit 12b3295
Copy full SHA for 12b3295

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎lib/adapters/http.js

Copy file name to clipboardExpand all lines: lib/adapters/http.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import utils from './../utils.js';
44
import settle from './../core/settle.js';
55
import buildFullPath from '../core/buildFullPath.js';
66
import buildURL from './../helpers/buildURL.js';
7-
import {getProxyForUrl} from 'proxy-from-env';
7+
import proxyFromEnv from 'proxy-from-env';
88
import http from 'http';
99
import https from 'https';
1010
import util from 'util';
@@ -83,7 +83,7 @@ function dispatchBeforeRedirect(options, responseDetails) {
8383
function setProxy(options, configProxy, location) {
8484
let proxy = configProxy;
8585
if (!proxy && proxy !== false) {
86-
const proxyUrl = getProxyForUrl(location);
86+
const proxyUrl = proxyFromEnv.getProxyForUrl(location);
8787
if (proxyUrl) {
8888
proxy = new URL(proxyUrl);
8989
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.