// alternatively you can use pfx + password as well here
const httpsAgent = new https.Agent({
cert: fs.readFileSync(process.env.PUBLIC_CERTIFICATE_PATH),
key: fs.readFileSync(process.env.PRIVATE_KEY_PATH),
ca: fs.readFileSync(process.env.CA_CHAIN_PATH)
})
axios.get(url, { httpsAgent })
const httpsAgent = new https.Agent({
cert: fs.readFileSync(process.env.PUBLIC_CERTIFICATE_PATH),
key: fs.readFileSync(process.env.PRIVATE_KEY_PATH),
ca: fs.readFileSync(process.env.CA_CHAIN_PATH)
})
axios.get(url, { httpsAgent })