From 4e01b28f92d3c13c26365fd84c830968b7a36c07 Mon Sep 17 00:00:00 2001 From: dbrand666 Date: Tue, 15 May 2012 21:28:52 -0300 Subject: [PATCH] Update lib/utils.js --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 43ab2873..46a9d3f9 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -26,7 +26,7 @@ function cloneArray (arr) { exports.extractHostname = function (req) { var headers = req.headers - , protocol = (req.connection.server instanceof tls.Server || req.headers['x-forwarded-proto'] == 'https') + , protocol = (req.connection.encrypted) ? 'https://' : 'http://' , host = headers.host;