Skip to content

Commit

Permalink
socketAddr may be undefined
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Gautier <[email protected]>
  • Loading branch information
Arthur Gautier committed Dec 9, 2015
1 parent fece5e2 commit 1f865fb
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 1f865fb

Please sign in to comment.