provide default ip
This commit is contained in:
parent
ac26776903
commit
029ba62261
1 changed files with 1 additions and 1 deletions
|
|
@ -228,7 +228,7 @@ function isNotLocal(ip) {
|
||||||
function remoteIP(req) {
|
function remoteIP(req) {
|
||||||
var ip = isNotLocal(req.headers['x-forwarded-for']) ||
|
var ip = isNotLocal(req.headers['x-forwarded-for']) ||
|
||||||
req.socket.remoteAddress ||
|
req.socket.remoteAddress ||
|
||||||
req.connection.remoteAddress,
|
req.connection.remoteAddress || '',
|
||||||
ipa = ip.split(',');
|
ipa = ip.split(',');
|
||||||
// if (ipa.length > 1) helper.log({remote:ipa});
|
// if (ipa.length > 1) helper.log({remote:ipa});
|
||||||
return ipa[0];
|
return ipa[0];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue