Skip to content

Commit

Permalink
remoteAddr may be undefined
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Gautier <baloo@gandi.net>
  • Loading branch information
Arthur Gautier committed Dec 9, 2015
1 parent fece5e2 commit 7a12b3c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function forwarded(req) {
.filter(Boolean)
.reverse()
var socketAddr = req.connection.remoteAddress
if (!socketAddr) return proxyAddrs;
var addrs = [socketAddr].concat(proxyAddrs)

// return all addresses
Expand Down

0 comments on commit 7a12b3c

Please sign in to comment.