logging unique IPs as well

v1.18.x
Julian Lam 11 years ago
parent aa71f1e088
commit c48d81379b

@ -964,9 +964,7 @@ var bcrypt = require('bcryptjs'),
};
User.logIP = function(uid, ip) {
db.sortedSetAdd('uid:' + uid + ':ip', +new Date(), ip || 'Unknown', function(err) {
// Do nothing
});
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();
});

Loading…
Cancel
Save