mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +01:00
Fixes Issue #3233: set httpsAgentRequestFields on request.httpsAgent when shouldProxy or shouldUseSystemProxy was false (#3317)
* fix: set httpsAgentRequestFields on request.httpsAgent when shouldProxy is false * fix: set httpsAgentRequestFields on request.httpsAgent when shouldUseSystemProxy is false
This commit is contained in:
parent
432d54acca
commit
6588dcf2fd
@ -233,6 +233,10 @@ const configureRequest = async (
|
||||
);
|
||||
request.httpAgent = new HttpProxyAgent(proxyUri);
|
||||
}
|
||||
} else {
|
||||
request.httpsAgent = new https.Agent({
|
||||
...httpsAgentRequestFields
|
||||
});
|
||||
}
|
||||
} else if (proxyMode === 'system') {
|
||||
const { http_proxy, https_proxy, no_proxy } = preferencesUtil.getSystemProxyEnvVariables();
|
||||
@ -257,6 +261,10 @@ const configureRequest = async (
|
||||
} catch (error) {
|
||||
throw new Error('Invalid system https_proxy');
|
||||
}
|
||||
} else {
|
||||
request.httpsAgent = new https.Agent({
|
||||
...httpsAgentRequestFields
|
||||
});
|
||||
}
|
||||
} else if (Object.keys(httpsAgentRequestFields).length > 0) {
|
||||
request.httpsAgent = new https.Agent({
|
||||
|
Loading…
Reference in New Issue
Block a user