diff --git a/.changeset/chilly-adults-jog.md b/.changeset/chilly-adults-jog.md new file mode 100644 index 0000000000..1d39348831 --- /dev/null +++ b/.changeset/chilly-adults-jog.md @@ -0,0 +1,5 @@ +--- +'@directus/api': patch +--- + +Redacted `access_token` in the query string when `LOG_STYLE=raw` diff --git a/api/src/logger/index.ts b/api/src/logger/index.ts index 9f02572509..ae884d7965 100644 --- a/api/src/logger/index.ts +++ b/api/src/logger/index.ts @@ -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('.');