From c248f645a97475ea831cf6787f6abdeae63d3dff Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Wed, 4 Dec 2024 15:07:00 -0600 Subject: [PATCH] uhm??? --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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