Skip to content

Commit b6ecc7e

Browse files
committed
Pass SNI callback to TLS server
PR-URL: #412
1 parent bdccd22 commit b6ecc7e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/server.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ class Server {
174174
}
175175

176176
bind() {
177-
const { options, application, console, balancer } = this;
178-
const { host, port, protocol, timeouts, nagle = true, key, cert } = options;
177+
const { application, console, balancer } = this;
178+
const { host, port, protocol, timeouts, nagle = true } = this.options;
179+
const { key, cert, SNICallback } = this.options;
179180
const proto = protocol === 'http' || balancer ? http : https;
180-
this.httpServer = proto.createServer({ key, cert, noDelay: !nagle });
181+
const options = { key, cert, noDelay: !nagle, SNICallback };
182+
this.httpServer = proto.createServer(options);
181183

182184
this.httpServer.on('listening', () => {
183185
console.info(`Listen port ${port}`);

0 commit comments

Comments
 (0)