Merge pull request #1950 from eyesonlyhack/disableIPlogging
Privacy: Add an option to disable IP logging
This commit is contained in:
commit
d43945db07
|
@ -82,6 +82,9 @@
|
|||
/*when you use NginX or another proxy/ load-balancer set this to true*/
|
||||
"trustProxy": false,
|
||||
|
||||
/* Privacy: disable IP logging */
|
||||
"disableIPlogging": false,
|
||||
|
||||
/* Users for basic authentication. is_admin = true gives access to /admin.
|
||||
If you do not uncomment this, /admin will not be available! */
|
||||
/*
|
||||
|
|
|
@ -130,6 +130,11 @@ exports.handleDisconnect = function(client)
|
|||
}
|
||||
|
||||
client.get('remoteAddress', function(er, ip) {
|
||||
//Anonymize the IP address if IP logging is disabled
|
||||
if(settings.disableIPlogging) {
|
||||
ip = 'ANONYMOUS';
|
||||
}
|
||||
|
||||
accessLogger.info('[LEAVE] Pad "'+session.padId+'": Author "'+session.author+'" on client '+client.id+' with IP "'+ip+'" left the pad')
|
||||
})
|
||||
|
||||
|
@ -995,6 +1000,11 @@ function handleClientReady(client, message)
|
|||
|
||||
//Log creation/(re-)entering of a pad
|
||||
client.get('remoteAddress', function(er, ip) {
|
||||
//Anonymize the IP address if IP logging is disabled
|
||||
if(settings.disableIPlogging) {
|
||||
ip = 'ANONYMOUS';
|
||||
}
|
||||
|
||||
if(pad.head > 0) {
|
||||
accessLogger.info('[ENTER] Pad "'+padIds.padId+'": Client '+client.id+' with IP "'+ip+'" entered the pad');
|
||||
}
|
||||
|
|
|
@ -109,6 +109,11 @@ exports.abiword = null;
|
|||
*/
|
||||
exports.loglevel = "INFO";
|
||||
|
||||
/**
|
||||
* Disable IP logging
|
||||
*/
|
||||
exports.disableIPlogging = false;
|
||||
|
||||
/*
|
||||
* log4js appender configuration
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue