Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

made the header check terser

  • Loading branch information...
commit 45ae18a29fbe862f81e4f65f20c86b2cb7a4bc8b 1 parent a885338
half-ogre authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/utils.js
2  lib/utils.js
View
@@ -27,7 +27,7 @@ function cloneArray (arr) {
exports.extractHostname = function (req) {
var headers = req.headers
, protocol = (req.connection.server instanceof tls.Server ||
- (req.headers['x-forwarded-proto'] !== undefined && req.headers['x-forwarded-proto'].slice(0,5) == 'https'))
+ (req.headers['x-forwarded-proto'] && req.headers['x-forwarded-proto'].slice(0,5) === 'https'))
? 'https://'
: 'http://'
, host = headers.host;
Please sign in to comment.
Something went wrong with that request. Please try again.