make logging of accounts creation optional

This commit is contained in:
hippoz 2021-10-21 22:15:39 +03:00
parent 23036ca0aa
commit c101db1de6
Signed by: hippoz
GPG key ID: 7C52899193467641
2 changed files with 6 additions and 4 deletions

View file

@ -93,7 +93,7 @@ app.post("/account/create", [
const userObject = await user.getPublicObject(); const userObject = await user.getPublicObject();
console.log("[*] [logger] [users] [create] User created", userObject); if (config.logAccountCreation) console.log("users: user created", userObject);
res.status(200).json({ res.status(200).json({
error: false, error: false,
@ -152,7 +152,7 @@ app.post("/token/create", [
const userObject = await existingUser.getPublicObject(); const userObject = await existingUser.getPublicObject();
console.log("[*] [logger] [users] [token create] Token created", userObject); if (config.logAccountCreation) console.log("users: token created", userObject);
res.status(200).json({ res.status(200).json({
error: false, error: false,

View file

@ -18,9 +18,9 @@ module.exports = {
allowAccountCreation: true, allowAccountCreation: true,
allowLogin: true, allowLogin: true,
allowGatewayConnection: true, allowGatewayConnection: true,
// The policy below will make all messages sent over the gateway to be in plain text saved to the database. // The policy below will make all messages sent over the gateway to be saved in plain text in the database.
// This is experimental and dangerous, and, as such, should generally not be used. // This is experimental and dangerous, and, as such, should generally not be used.
allowSavingMessages: false, allowSavingMessages: true,
perUserMaxGatewayConnections: 4 perUserMaxGatewayConnections: 4
}, },
/* /*
@ -40,6 +40,8 @@ module.exports = {
gatewayMaxPayloadBytes: 4096, gatewayMaxPayloadBytes: 4096,
clientFacingPingInterval: 14750, clientFacingPingInterval: 14750,
bcryptRounds: 10, bcryptRounds: 10,
// displays a message containing the username, role, etc. of a new created user or token (tokens and passwords should be stripped)
logAccountCreation: false,
experiments: { experiments: {
voiceSFUTesting: false voiceSFUTesting: false
}, },