a
This commit is contained in:
parent
878579444f
commit
7d82370fb2
3 changed files with 7 additions and 3 deletions
2
index.js
2
index.js
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue