Merge commit from fork

* Redact `access_token` in the query string when `LOG_STYLE=raw`

* Add changeset

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
ian
2024-08-03 02:05:18 +08:00
committed by GitHub
parent 4094e938b0
commit 2e893f9c57
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'@directus/api': patch
---
Redacted `access_token` in the query string when `LOG_STYLE=raw`

View File

@@ -100,7 +100,7 @@ export const createExpressLogger = () => {
if (env['LOG_STYLE'] === 'raw') {
httpLoggerOptions.redact = {
paths: ['req.headers.authorization', 'req.headers.cookie', 'res.headers'],
paths: ['req.headers.authorization', 'req.headers.cookie', 'res.headers', 'req.query.access_token'],
censor: (value, pathParts) => {
const path = pathParts.join('.');