mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(HTTP Request Node): Sanitize authorization headers (#10607)
This commit is contained in:
@@ -88,7 +88,24 @@ export function sanitizeUiMessage(
|
||||
),
|
||||
};
|
||||
}
|
||||
const HEADER_BLOCKLIST = new Set([
|
||||
'authorization',
|
||||
'x-api-key',
|
||||
'x-auth-token',
|
||||
'cookie',
|
||||
'proxy-authorization',
|
||||
'sslclientcert',
|
||||
]);
|
||||
|
||||
const headers = sendRequest.headers as IDataObject;
|
||||
|
||||
if (headers) {
|
||||
for (const headerName of Object.keys(headers)) {
|
||||
if (HEADER_BLOCKLIST.has(headerName.toLowerCase())) {
|
||||
headers[headerName] = REDACTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (secrets && secrets.length > 0) {
|
||||
return redact(sendRequest, secrets);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user