From 179ebf6a7fdf7e057ada15afea8123afe89d3138 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Thu, 14 Dec 2023 23:45:50 +0100 Subject: [PATCH] Changed secure context regex generation --- svr.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/svr.js b/svr.js index 625e960..53b22b2 100644 --- a/svr.js +++ b/svr.js @@ -2111,6 +2111,9 @@ if (!cluster.isPrimary) { cert: sniCredentialsSingle.cert, key: sniCredentialsSingle.key }); + try { + server._contexts[server._contexts.length-1][0] = new RegExp("^" + sniCredentialsSingle.name.replace(/([.^$+?\-\\[\]{}])/g, "\\$1").replace(/\*/g, "[^.]*") + "\.?$", "i"); + } catch(ex) {} }); } server.on("request", reqhandler);