blob: 08fcf07d8fb36835620183f685baeca504c5d34e (
plain)
1
2
3
4
5
6
7
8
9
10
|
var cmn=require("../$common.js"),
fs=require("fs");
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));
});
};
|