. Advertisement .
..3..
. Advertisement .
..4..
Hi everyone. I’m learning about programming and am very surprised when the error hostname ip does not match certificate’s altnames occurs.
Please show me the fastest way to fix it. Thanks in advance for everyone’s help.
Hi. I will tell you the way to fix the hostname or IP not matching certificate’s altnames with Node.js.
Solution:
You could utilize
http-proxy
withchangeOrigin
totrue
.For example, I write:
to set up a proxy so that traffic going to example.com:3000 is proxied.
Next, we design the server using:
We use
fs.readFileSync
to read the key as well as certificate, and after that, we establishtarget
to the hostname where our server is being hosted.