Skip to content

Instantly share code, notes, and snippets.

@ryxnSZN
Created May 26, 2020 22:10
Show Gist options
  • Save ryxnSZN/59012bc8b5bfbfe39cd4f941f5223d2e to your computer and use it in GitHub Desktop.
Save ryxnSZN/59012bc8b5bfbfe39cd4f941f5223d2e to your computer and use it in GitHub Desktop.
Patch for Node.js request that will pass sigalgs to a tunnel.
diff --git a/node_modules/request/lib/tunnel.js b/node_modules/request/lib/tunnel.js
index 4479003..4e4638b 100644
--- a/node_modules/request/lib/tunnel.js
+++ b/node_modules/request/lib/tunnel.js
@@ -86,6 +86,10 @@ function constructTunnelOptions (request, proxyHeaders) {
secureProtocol: request.secureProtocol
}
+ if (request.agentOptions && request.agentOptions.sigalgs) {
+ tunnelOptions.sigalgs = request.agentOptions.sigalgs
+ }
+
return tunnelOptions
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment