Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

morgan

Package Overview
Dependencies
Maintainers
6
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

morgan - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

7

HISTORY.md

@@ -0,5 +1,10 @@

1.3.2 / 2014-09-27
==================
* Fix `req.ip` integration when `immediate: false`
1.3.1 / 2014-09-14
==================
* Remove us-used `bytes` dependency
* Remove un-used `bytes` dependency
* deps: depd@0.4.5

@@ -6,0 +11,0 @@

19

index.js

@@ -95,3 +95,3 @@ /*!

req._startTime = new Date;
req._remoteAddress = req.connection && req.connection.remoteAddress;
req._remoteAddress = getip(req);

@@ -274,8 +274,3 @@ function logRequest(){

exports.token('remote-addr', function(req){
if (req.ip) return req.ip;
if (req._remoteAddress) return req._remoteAddress;
if (req.connection) return req.connection.remoteAddress;
return undefined;
});
exports.token('remote-addr', getip);

@@ -324,1 +319,11 @@ /**

/**
* Get request IP address.
*/
function getip(req) {
return req.ip
|| req._remoteAddress
|| (req.connection && req.connection.remoteAddress)
|| undefined;
}
{
"name": "morgan",
"description": "http request logger middleware for node.js",
"version": "1.3.1",
"version": "1.3.2",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",

@@ -6,0 +6,0 @@ "contributors": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc