I am using axios as an HTTP client for node.js
I am using a proxy on localhost and port 8888 so I can sniff network traffic with Charles Proxy for debugging.
axios.get(`http://example.com',
{ proxy: { host: '127.0.0.1', port: 8888 })
.then(result => { // })
.catch(error => { console.log(error) })
With this configuration, I often receive this error message:
Error: Hostname/IP doesn't match certificate's altnames:
I read here: Node.js Hostname/IP doesn't match certificate's altnames that I have to configure node.js like this to disable security checks:
{ rejectUnauthorized : false }
My question is how and where exactly do I make that configuration?