summaryrefslogtreecommitdiff
path: root/modules/ip
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ip')
-rw-r--r--modules/ip/ip.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/ip/ip.js b/modules/ip/ip.js
index 08fcf07..49de257 100644
--- a/modules/ip/ip.js
+++ b/modules/ip/ip.js
@@ -3,8 +3,6 @@ var cmn=require("../$common.js"),
module.exports=function(app,io,moddir){
app.get("/ip",function(req,res){
- var ip=req.headers["x-forwarded-for"];
- if(ip)res.send(ip);
- else res.send(String(req.socket.remoteAddress));
+ res.send(req.ip);
});
};