mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(HTTP Request Node): Always lowercase headers
This commit is contained in:
@@ -172,3 +172,11 @@ export const fuzzyCompare = (useFuzzyCompare: boolean, compareVersion = 1) => {
|
||||
return isEqual(item1, item2);
|
||||
};
|
||||
};
|
||||
|
||||
export const keysToLowercase = <T>(headers: T) => {
|
||||
if (typeof headers !== 'object' || Array.isArray(headers) || headers === null) return headers;
|
||||
return Object.entries(headers).reduce((acc, [key, value]) => {
|
||||
acc[key.toLowerCase()] = value;
|
||||
return acc;
|
||||
}, {} as IDataObject);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user