我不确定这种方法的安全性,但这里是从网上答案中收集的:
var http = require('http');http.createServer(function (req, res){ var ip = req.ip || req.connection.remoteAddress || req.socket.remoteAddress || req.connection.socket.remoteAddress; if (ip == '127.0.0.1') // exit if it's a particular ip res.end();...请,一个更精通节点的人-纠正我



