Answer the question
In order to leave comments, you need to log in
Why can't https server see incoming requests?
Unable to start https server, native htttps module is used, certificates are purchased. Through the wireshark, you can see that a request is coming. But the node does not seem to see it. If I run it as http, then all requests are normally displayed and responses go away.
const https = require('https');
const fs = require('fs');
const options = {
key: fs.readFileSync('key.pem'),
cert: fs.readFileSync('cert.pem')
};
https.createServer(options, (req, res) => {
console.log("request");
res.writeHead(200);
res.end('hello world\n');
}).listen(8443);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question