Skip to content

Commit

Permalink
Merge pull request #7035 from balderdashy/Remove-ssl-check-in-http-hook
Browse files Browse the repository at this point in the history
[Patch] Remove check for SSL when applying serverOptions
  • Loading branch information
rachaelshaw authored Sep 2, 2020
2 parents 617674f + e18aadd commit 82fd488
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/hooks/http/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,17 @@ module.exports = function(sails) {

// Use serverOptions if they were specified
// Manually create http server using Express app instance
if (sails.config.http.serverOptions || isUsingSSL) {
sails.hooks.http.server = createServer(serverOptions, expressApp);
if(process.version.match(/^v(\d+\.\d+)/)[1] < 10.12){
if (sails.config.http.serverOptions || isUsingSSL) {
sails.hooks.http.server = createServer(serverOptions, expressApp);
}
else {
sails.hooks.http.server = createServer(expressApp);
}
}
else {
sails.hooks.http.server = createServer(expressApp);
sails.hooks.http.server = createServer(serverOptions, expressApp);
}

// Keep track of all openTcpConnections that come in,
// so we can destroy them later if we want to.
var openTcpConnections = {};
Expand Down

0 comments on commit 82fd488

Please sign in to comment.