mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
feat: Logins log for Fail2Ban (#986)
* login logs and output * fix(merge) * fix(wiston) unistall * fix(winston) installation in api * fix(logger) new module
This commit is contained in:
parent
7c0379ba51
commit
1bf6c259b9
5 changed files with 198 additions and 27 deletions
|
|
@ -1,23 +1,4 @@
|
|||
const pino = require('pino');
|
||||
|
||||
const logger = pino({
|
||||
level: 'info',
|
||||
redact: {
|
||||
paths: [
|
||||
// List of Paths to redact from the logs (https://getpino.io/#/docs/redaction)
|
||||
'env.OPENAI_API_KEY',
|
||||
'env.BINGAI_TOKEN',
|
||||
'env.CHATGPT_TOKEN',
|
||||
'env.MEILI_MASTER_KEY',
|
||||
'env.GOOGLE_CLIENT_SECRET',
|
||||
'env.JWT_SECRET',
|
||||
'env.JWT_SECRET_DEV',
|
||||
'env.JWT_SECRET_PROD',
|
||||
'newUser.password',
|
||||
], // See example to filter object class instances
|
||||
censor: '***', // Redaction character
|
||||
},
|
||||
});
|
||||
const logger = require('./logger');
|
||||
|
||||
// Sanitize outside the logger paths. This is useful for sanitizing variables directly with Regex and patterns.
|
||||
const redactPatterns = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue