Skip to content

Problem handling self signed cert for proxy in 1.16.1 #10953

@jschweik

Description

@jschweik

In 1.16.0 and prior a call with proxy would succeed if the certificate were self signed as long as either rejectUnauthorized was overridden to false or the certificate itself was set.

const options = {
    method: 'GET',
    url: `https://mydomain.com`,
    proxy: {
      protocol: 'https',
      host: '127.0.0.1',
      port: '8080'
    },
    httpsAgent: new https.Agent({
      rejectUnauthorized: false,
      ca: certificateData
    })
  };

  const response = await axios.request(options);

In 1.16.1, regardless of these values, you are met with a "self-signed certificate in certificate chain" error.

With the https-proxy-agent changes in 1.16.1, is there a different way to either provide the cert or have it ignored for a specific request?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions