Host: localhost. is not in the cert’s altnames
The error is not caused by the code you have in your question. What you are doing is that you are creating a new HTTP server, that will listen to httpsPort and will bind to 0.0.0.0 which means all local IP addresses. I suggest you omit 0.0.0.0 when binding to all local IP addresses since … Read more