mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Do not overwrite accept header if set on HTTP Request Node
This commit is contained in:
@@ -797,14 +797,15 @@ export class HttpRequest implements INodeType {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (requestOptions.headers!['accept'] === undefined) {
|
||||||
if (responseFormat === 'json') {
|
if (responseFormat === 'json') {
|
||||||
|
|
||||||
requestOptions.headers!['accept'] = 'application/json,text/*;q=0.99';
|
requestOptions.headers!['accept'] = 'application/json,text/*;q=0.99';
|
||||||
} else if (responseFormat === 'string') {
|
} else if (responseFormat === 'string') {
|
||||||
requestOptions.headers!['accept'] = 'application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, */*;q=0.1';
|
requestOptions.headers!['accept'] = 'application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, */*;q=0.1';
|
||||||
} else {
|
} else {
|
||||||
requestOptions.headers!['accept'] = 'application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7';
|
requestOptions.headers!['accept'] = 'application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (responseFormat === 'file') {
|
if (responseFormat === 'file') {
|
||||||
requestOptions.encoding = null;
|
requestOptions.encoding = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user