So, I am currently having an issue where I implemented a server with working routing (contained in ./router), and supplies session cookies (with the HttpOnly and SameSite flags, but not Secure, yet). However, now that I have generated a 4096 key and the corresponding cert with SSL, I get a "This page isn't working, 192.168.1.233 didn't send any data" when I try to access it. The port was moved from 80 to 443, and I altered my firewall rules accordingly. If anyone could explain what the error here is, I would appreciate it. For reference, this site is hosted on my intranet, and is not meant to be externally accessible.
For reference, this is my server code:
var https = require("https");
var fs = require("fs");
var router = require("./router");
var options =
{
key: fs.readFileSync("keys/server-key.pem"),
cert: fs.readFileSync("keys/server-cert.pem")
};
var port = 443;
var ip = "192.168.1.233";
var server = https.createServer(options, router.handleRequest).listen(port, ip);
console.log("Listening on https://" + ip + ":" + port);
Also, one condition: Don't tell me to use Express. I want to do this at a low-level for educational purposes.
via DeepS1X
No comments:
Post a Comment