mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
fix: add missing log filter env variables to examples (#5376)
* Sanitize sensitive fields in request header and body in logger * fix: log request headers, body, and query only when debug logs are enabled * fix: add missing env to examples * fix: crash due to missing env vars
This commit is contained in:
@@ -194,6 +194,7 @@ requestLogger = createLogger({
|
||||
})
|
||||
|
||||
function getSensitiveBodyFields(): string[] {
|
||||
if (!process.env.LOG_SANITIZE_BODY_FIELDS) return []
|
||||
return (process.env.LOG_SANITIZE_BODY_FIELDS as string)
|
||||
.toLowerCase()
|
||||
.split(',')
|
||||
@@ -201,6 +202,7 @@ function getSensitiveBodyFields(): string[] {
|
||||
}
|
||||
|
||||
function getSensitiveHeaderFields(): string[] {
|
||||
if (!process.env.LOG_SANITIZE_HEADER_FIELDS) return []
|
||||
return (process.env.LOG_SANITIZE_HEADER_FIELDS as string)
|
||||
.toLowerCase()
|
||||
.split(',')
|
||||
|
||||
Reference in New Issue
Block a user