How to find out the remote Address in node.js if it is HTTPS request?
问题 HI. in node.js, if it is http request, I can get the remoteAddress at req.connection.remoteAddress, so, how to get it if https request? I find there is req.socket.remoteAddress but I'm not sure. Please advice. thanks. 回答1: It appears something is strange/broken indeed. As of node 0.4.7, it seems http has remoteAddress available on: req.connection.remoteAddress req.socket.remoteAddress on https, both of these are undefined, but req.connection.socket.remoteAddress does work. That one isn't