From 8f369226cf1e0e8a8df75d67ae3cebf89b3cb054 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 30 Jun 2019 21:46:38 -0600 Subject: [PATCH] v2.7.10: improve error handling --- index.js | 3 +++ package.json | 2 +- server.js | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 63ff81f..d1764ad 100644 --- a/index.js +++ b/index.js @@ -230,10 +230,13 @@ module.exports.create = function(opts) { } }); server = https.createServer(greenlock.tlsOptions, function(req, res) { + /* + // Don't do this yet req.on("error", function(err) { console.error("HTTPS Request Network Connection Error:"); console.error(err); }); + */ mw(req, res); }); server.type = httpType; diff --git a/package.json b/package.json index c13bd79..4215a25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenlock-express", - "version": "2.7.9", + "version": "2.7.10", "description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.", "main": "index.js", "homepage": "https://greenlock.domains", diff --git a/server.js b/server.js index 2fa6993..ce6acff 100644 --- a/server.js +++ b/server.js @@ -210,6 +210,11 @@ function checkWwws(_hostname) { exports.checkWwws = checkWwws; function myVhostApp(req, res) { + req.on("error", function(err) { + console.error("HTTPS Request Network Connection Error:"); + console.error(err); + }); + // SECURITY greenlock pre-sanitizes hostnames to prevent unauthorized fs access so you don't have to // (also: only domains approved above will get here) console.info("");