1
0
Fork 0
forked from svrjs/svrjs

Errors that occurred while adding SNI context to a server are now ignored.

This commit is contained in:
Dorian Niemiec 2024-04-27 06:45:16 +02:00
parent 9eb982dc92
commit 7dfdc7209e

4
svr.js
View file

@ -2177,6 +2177,7 @@ if (!cluster.isPrimary) {
}
}
if (secure) {
try {
sniCredentials.forEach(function (sniCredentialsSingle) {
server.addContext(sniCredentialsSingle.name, {
cert: sniCredentialsSingle.cert,
@ -2190,6 +2191,9 @@ if (!cluster.isPrimary) {
// Can't replace regex, ignoring...
}
});
} catch (err) {
// SNI error
}
}
server.on("request", reqhandler);
server.on("checkExpectation", reqhandler);