mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Some small changes
This commit is contained in:
parent
7795ed1a03
commit
27d5eff771
1 changed files with 19 additions and 13 deletions
|
|
@ -14,6 +14,7 @@ let timedoutImdsEndpoints = [];
|
|||
* @returns {void}
|
||||
*/
|
||||
export function tunnelRequest(req, clientSocket, head) {
|
||||
try {
|
||||
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
|
||||
|
||||
if (httpsProxy) {
|
||||
|
|
@ -31,6 +32,11 @@ export function tunnelRequest(req, clientSocket, head) {
|
|||
} else {
|
||||
tunnelRequestToDestination(req, clientSocket, head);
|
||||
}
|
||||
} catch (/** @type {any} */ err) {
|
||||
ui.writeError(
|
||||
`Safe-chain: tunnel request failed for ${req.url} : ${err.message}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue