node.js - Get remote IP in Parse.com -


there mechanism in node remote ip calling req.connection.remoteaddress.

i tried below code remote ip of client result undefined.

var ipaddr = req.headers["x-forwarded-for"]; if (ipaddr){     var list = ipaddr.split(",");     ipaddr = list[list.length-1]; } else {     ipaddr = req.connection.remoteaddress; } console.log("req.connection.remoteaddress:" + ipaddr); 

does know if can remoteip in parse.com cloud code?


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -