1
0
Fork 0
forked from svrjs/svrjs

Changed secure context regex generation

This commit is contained in:
Dorian Niemiec 2023-12-14 23:45:50 +01:00
parent 355d20a2c1
commit 179ebf6a7f

3
svr.js
View file

@ -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);