snyk 1.1065.0 → 1.1066.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +13 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +4 -4
package/dist/cli/index.js
CHANGED
|
@@ -5371,6 +5371,19 @@ class Agent {
|
|
|
5371
5371
|
requestUrl = this.protocol + '//' + (configuration.hostname || configuration.host) + (configuration.port === 80 || configuration.port === 443 ? '' : ':' + configuration.port) + request.path;
|
|
5372
5372
|
}
|
|
5373
5373
|
|
|
5374
|
+
// If a request should go to a local socket, proxying it through an HTTP
|
|
5375
|
+
// server does not make sense as the information about the target socket
|
|
5376
|
+
// will be lost and the proxy won't be able to correctly handle the request.
|
|
5377
|
+
if (configuration.socketPath) {
|
|
5378
|
+
log.trace({
|
|
5379
|
+
destination: configuration.socketPath,
|
|
5380
|
+
}, "not proxying request; destination is a socket");
|
|
5381
|
+
|
|
5382
|
+
// @ts-expect-error seems like we are using wrong type for fallbackAgent.
|
|
5383
|
+
this.fallbackAgent.addRequest(request, configuration);
|
|
5384
|
+
return;
|
|
5385
|
+
}
|
|
5386
|
+
|
|
5374
5387
|
if (!this.isProxyConfigured()) {
|
|
5375
5388
|
log.trace({
|
|
5376
5389
|
destination: requestUrl
|