Skip to content

Commit

Permalink
Merge 8dd485a into 4cb31ee
Browse files Browse the repository at this point in the history
  • Loading branch information
J4Numbers committed Nov 14, 2023
2 parents 4cb31ee + 8dd485a commit 9115e7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/request.js
Expand Up @@ -9,7 +9,7 @@
*/

var http = require('http')
, https = require('https')
, tls = require('tls')
, methods = require('methods')
, superagent = require('superagent')
, Agent = superagent.agent
Expand Down Expand Up @@ -283,7 +283,7 @@ function serverAddress (app, path) {
if (!addr) {
throw new Error('Server is not listening')
}
var protocol = (app instanceof https.Server) ? 'https' : 'http';
var protocol = (app instanceof tls.Server) ? 'https' : 'http';
// If address is "unroutable" IPv4/6 address, then set to localhost
if (addr.address === '0.0.0.0' || addr.address === '::') {
addr.address = '127.0.0.1';
Expand Down

0 comments on commit 9115e7c

Please sign in to comment.