From 5a99e93f8d2c66d7dbcef382478badd63bc4a0b5 Mon Sep 17 00:00:00 2001 From: Eugene Date: Thu, 26 Sep 2024 13:15:50 +0200 Subject: [PATCH] fix(HTTP Request Tool Node): Remove default user agent header (#10971) --- .../nodes/tools/ToolHttpRequest/ToolHttpRequest.node.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.ts b/packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.ts index 421e85e1b5..32f6be42e7 100644 --- a/packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.ts @@ -275,7 +275,11 @@ export class ToolHttpRequest implements INodeType { method: this.getNodeParameter('method', itemIndex, 'GET') as IHttpRequestMethods, url: this.getNodeParameter('url', itemIndex) as string, qs: {}, - headers: {}, + headers: { + // FIXME: This is a workaround to prevent the node from sending a default User-Agent (`n8n`) when the header is not set. + // Needs to be replaced with a proper fix after NODE-1777 is resolved + 'User-Agent': undefined, + }, body: {}, };