flat
flat copied to clipboard
Ability to use HTTPS URL with self-signed certificate
I'm looking for an option to use a HTTPS URL with a self-signed certificate.
The solution could either ignore SSL warnings all together, or an option to provide a CA bundle to trust.
I was unable to figure out a way to do this with axios_config
.
The URL I'm attempting to use is at https://gdmf.apple.com/v2/pmv.
Hi @n8felton!
A little bit of digging around suggests that adding this key to the axios config string should disable selfsigned cert checks:
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
I'm not sure how you'd supply your own cert bundle but I suspect it's possible, if you check it into the repo maybe:
httpsAgent: new https.Agent({ ca: MY_CA_BUNDLE });
Hopefully that leads to some success!