This commit is contained in:
biglyderv 2025-04-04 11:36:46 -04:00
parent 878579444f
commit 7d82370fb2
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
3 changed files with 7 additions and 3 deletions

View file

@ -13,7 +13,7 @@ app.set('trust proxy', true)
app.use(express.static('static'));
app.post('/', async function (req, res) {
let ip = req.headers.get('X-Real-IP') || req.ip;
let ip = req.headers['X-Real-IP'] || req.ip;
let id = 'web:' + createHash('sha256').update(ip).digest('hex');
console.log(ip);
id = id.slice(0, 24);