Pass default certs to SNICallback example

Using only SNICallback to create a HTTPS / TLS server is bad. It means all non SNI clients can't do anything because there are no certs.

in v0.10 of node TLS server was updated to throw if you forgot to supply certs.

Which means that every HTTPS server needs to supply certs as a fallback for when SNI is not available.

 - closes #399
This commit is contained in:
Raynos 2013-05-10 17:55:01 -06:00
parent de0928f616
commit f5e1844abd

View File

@ -345,7 +345,10 @@ var options = {
https: {
SNICallback: function (hostname) {
return certs[hostname];
}
},
cert: myCert,
key: myKey,
ca: [myCa]
},
hostnameOnly: true,
router: {