mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
feat(HTTP Request Node): Add option to disable lowercase headers (#10154)
This commit is contained in:
parent
d165b33cea
commit
5aba69bcf4
|
@ -806,6 +806,13 @@ export class HttpRequestV3 implements INodeType {
|
|||
],
|
||||
default: 'brackets',
|
||||
},
|
||||
{
|
||||
displayName: 'Lowercase Headers',
|
||||
name: 'lowercaseHeaders',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
description: 'Whether to lowercase header names',
|
||||
},
|
||||
{
|
||||
displayName: 'Redirects',
|
||||
name: 'redirect',
|
||||
|
@ -1388,6 +1395,7 @@ export class HttpRequestV3 implements INodeType {
|
|||
allowUnauthorizedCerts,
|
||||
queryParameterArrays,
|
||||
response,
|
||||
lowercaseHeaders,
|
||||
} = this.getNodeParameter('options', itemIndex, {}) as {
|
||||
batching: { batch: { batchSize: number; batchInterval: number } };
|
||||
proxy: string;
|
||||
|
@ -1398,6 +1406,7 @@ export class HttpRequestV3 implements INodeType {
|
|||
response: { neverError: boolean; responseFormat: string; fullResponse: boolean };
|
||||
};
|
||||
redirect: { redirect: { maxRedirects: number; followRedirects: boolean } };
|
||||
lowercaseHeaders: boolean;
|
||||
};
|
||||
|
||||
const url = this.getNodeParameter('url', itemIndex) as string;
|
||||
|
@ -1611,7 +1620,9 @@ export class HttpRequestV3 implements INodeType {
|
|||
}
|
||||
requestOptions.headers = {
|
||||
...requestOptions.headers,
|
||||
...keysToLowercase(additionalHeaders),
|
||||
...(lowercaseHeaders === undefined || lowercaseHeaders
|
||||
? keysToLowercase(additionalHeaders)
|
||||
: additionalHeaders),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue