Skip to content

Commit

Permalink
fix: do not reject unauthorized by default (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Jun 1, 2020
1 parent 3c296d3 commit 6277a40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/classes/Agent.js
Expand Up @@ -143,7 +143,7 @@ class Agent {
key: configuration.key,
passphrase: configuration.passphrase,
pfx: configuration.pfx,
rejectUnauthorized: configuration.rejectUnauthorized,
rejectUnauthorized: configuration.rejectUnauthorized || false,
secureOptions: configuration.secureOptions,
secureProtocol: configuration.secureProtocol,
servername: configuration.servername || connectionConfiguration.host,
Expand Down
4 changes: 1 addition & 3 deletions src/classes/HttpsProxyAgent.js
Expand Up @@ -29,9 +29,7 @@ class HttpsProxyAgent extends Agent {

socket.once('data', () => {
const secureSocket = tls.connect({
rejectUnauthorized: false,
servername: configuration.host,
... configuration.tls,
...configuration.tls,
socket,
});

Expand Down

0 comments on commit 6277a40

Please sign in to comment.