Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,6 @@ | ||
1.1.1 / 2014-05-20 | ||
================== | ||
* simplify method to get remote address | ||
1.1.0 / 2014-05-18 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -85,6 +85,5 @@ /*! | ||
return function logger(req, res, next) { | ||
var sock = req.socket; | ||
req._startAt = process.hrtime(); | ||
req._startTime = new Date; | ||
req._remoteAddress = sock.socket ? sock.socket.remoteAddress : sock.remoteAddress; | ||
req._remoteAddress = req.connection && req.connection.remoteAddress; | ||
@@ -252,5 +251,4 @@ function logRequest(){ | ||
if (req._remoteAddress) return req._remoteAddress; | ||
var sock = req.socket; | ||
if (sock.socket) return sock.socket.remoteAddress; | ||
return sock.remoteAddress; | ||
if (req.connection) return req.connection.remoteAddress; | ||
return undefined; | ||
}); | ||
@@ -257,0 +255,0 @@ |
{ | ||
"name": "morgan", | ||
"description": "http request logger middleware for node.js", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": { | ||
@@ -30,3 +30,2 @@ "name": "Jonathan Ong", | ||
"devDependencies": { | ||
"coveralls": "2.10.0", | ||
"istanbul": "0.2.10", | ||
@@ -43,4 +42,4 @@ "mocha": "~1.19.0", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require should --reporter dot", | ||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require should --reporter spec && (cat ./coverage/lcov.info | coveralls || true)" | ||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require should --reporter spec" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
11028
224