diff --git a/index.js b/index.js index 45d5b6f..6b29bc1 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,8 @@ app.listen(PORT, () => { console.log("Shit ass dumb ip grabber is on port " + PORT) }) +app.set('trust proxy', true) + app.get("*", (req, res) => { - console.log("This motherfucker's IP is " + req.headers['x-forwarded-for'] || req.socket.remoteAddress || req.hostname) + console.log("This motherfucker's IP is " + req.ip || req.ips || req.headers['x-forwarded-for'] || req.socket.remoteAddress || req.hostname) }) \ No newline at end of file