mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Privacy: Add an option to disable IP logging
This commit is contained in:
parent
a120d78b7e
commit
fbe4e43c3d
3 changed files with 18 additions and 0 deletions
|
@ -82,6 +82,9 @@
|
||||||
/*when you use NginX or another proxy/ load-balancer set this to true*/
|
/*when you use NginX or another proxy/ load-balancer set this to true*/
|
||||||
"trustProxy": false,
|
"trustProxy": false,
|
||||||
|
|
||||||
|
/* Privacy: disable IP logging */
|
||||||
|
"disableIPlogging": false,
|
||||||
|
|
||||||
/* Users for basic authentication. is_admin = true gives access to /admin.
|
/* Users for basic authentication. is_admin = true gives access to /admin.
|
||||||
If you do not uncomment this, /admin will not be available! */
|
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) {
|
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')
|
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
|
//Log creation/(re-)entering of a pad
|
||||||
client.get('remoteAddress', function(er, ip) {
|
client.get('remoteAddress', function(er, ip) {
|
||||||
|
//Anonymize the IP address if IP logging is disabled
|
||||||
|
if(settings.disableIPlogging) {
|
||||||
|
ip = 'ANONYMOUS';
|
||||||
|
}
|
||||||
|
|
||||||
if(pad.head > 0) {
|
if(pad.head > 0) {
|
||||||
accessLogger.info('[ENTER] Pad "'+padIds.padId+'": Client '+client.id+' with IP "'+ip+'" entered the pad');
|
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";
|
exports.loglevel = "INFO";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable IP logging
|
||||||
|
*/
|
||||||
|
exports.disableIPlogging = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* log4js appender configuration
|
* log4js appender configuration
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue