Skip to content

Commit f5e1844

Browse files
committed
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 http-party#399
1 parent de0928f commit f5e1844

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,10 @@ var options = {
345345
https: {
346346
SNICallback: function (hostname) {
347347
return certs[hostname];
348-
}
348+
},
349+
cert: myCert,
350+
key: myKey,
351+
ca: [myCa]
349352
},
350353
hostnameOnly: true,
351354
router: {

0 commit comments

Comments
 (0)