diff --git a/config.example.js b/config.example.js index d2ea25a3e..da000a519 100644 --- a/config.example.js +++ b/config.example.js @@ -277,6 +277,11 @@ module.exports = { */ //logFeedback: true, + /* If you wish to see which remote procedure calls clients request, + * set this to true + */ + //logRPC: true, + /* it is recommended that you serve CryptPad over https * the filepaths below are used to configure your certificates */ diff --git a/rpc.js b/rpc.js index 1df16b8f9..d00ee93b7 100644 --- a/rpc.js +++ b/rpc.js @@ -944,6 +944,7 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function) if (!Env.msgStore) { Env.msgStore = ctx.store; } var handleMessage = function (privileged) { + if (config.logRPC) { console.log(msg[0]); } switch (msg[0]) { case 'COOKIE': return void Respond(void 0); case 'RESET':