From 878579444f0e36315b4548ab01c8b84c16c0aa19 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Fri, 4 Apr 2025 11:34:07 -0400 Subject: [PATCH] fix? --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 6075b93..a1da3fe 100644 --- a/index.js +++ b/index.js @@ -13,8 +13,9 @@ app.set('trust proxy', true) app.use(express.static('static')); app.post('/', async function (req, res) { - let id = 'web:' + createHash('sha256').update(req.ip).digest('hex'); - console.log(req.ip) + let ip = req.headers.get('X-Real-IP') || req.ip; + let id = 'web:' + createHash('sha256').update(ip).digest('hex'); + console.log(ip); id = id.slice(0, 24); if (!sessions[id]) {