wodin
April 8, 2023, 2:21pm
2
Hi @syedimam1998
Are you on a network with a corporate proxy server that intercepts your HTTPS requests?
The error message means that Nodejs doesn’t recognise the CA that has signed the Web server’s certificate. But that implies that something between the server and you is acting as a man in the middle to intercept the traffic.
It sounds like there’s a transparent proxy between you and the Internet.
I think the norm would be for them to set up a CA and automatically sign web site certificates as you browse. If so they likely install the CA certificate as a trusted CA.
If the above is correct for your situation then it would be best to get the CA cert, e.g. from your browser and tell node about the trusted cert.
https://nodejs.org/api/cli.html#cli_node_extra_ca_certs_file
Hi
As far as I know this type of proxy basically works as a MITM pretending to be the remote server. This is so it can decrypt the traffic to all remote servers from the users’ browsers etc. for monitoring purposes.
As far as I know they have their own CA cert (which is necessarily self-signed) in order to generate new certs on the fly for all the servers the users are connecting to.
In order for browsers etc. not to complain, two things are needed.
The proxy needs to generate a cert for ea…