mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-14 16:40:52 +01:00
Merge branch 'master' of https://github.com/designcreateplay/NodeBB
This commit is contained in:
@@ -964,9 +964,7 @@ var bcrypt = require('bcryptjs'),
|
||||
};
|
||||
|
||||
User.logIP = function(uid, ip) {
|
||||
db.sortedSetAdd('uid:' + uid + ':ip', +new Date(), ip || 'Unknown', function(err) {
|
||||
console.log(ip, 'for uid', uid);
|
||||
});
|
||||
db.sortedSetAdd('uid:' + uid + ':ip', +new Date(), ip || 'Unknown');
|
||||
};
|
||||
|
||||
User.email = {
|
||||
|
||||
@@ -278,6 +278,9 @@ process.on('uncaughtException', function(err) {
|
||||
// Disable framing
|
||||
res.setHeader('X-Frame-Options', 'SAMEORIGIN');
|
||||
|
||||
// Log IP address
|
||||
db.sortedSetAdd('ip:recent', +new Date(), req.ip || 'Unknown');
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user