mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Add Expression-Support to responseHeaders
This commit is contained in:
parent
a9e665dd9b
commit
a3106219f4
|
@ -150,11 +150,16 @@ export function getWorkflowWebhooks(workflow: Workflow, additionalData: IWorkflo
|
|||
}
|
||||
|
||||
if (webhookData.webhookDescription['responseHeaders'] !== undefined) {
|
||||
const responseHeaders = workflow.getComplexParameterValue(workflowStartNode, webhookData.webhookDescription['responseHeaders'], undefined) as any;
|
||||
const responseHeaders = workflow.getComplexParameterValue(workflowStartNode, webhookData.webhookDescription['responseHeaders'], undefined) as {
|
||||
entries?: Array<{
|
||||
name: string;
|
||||
value: string;
|
||||
}> | undefined;
|
||||
};
|
||||
|
||||
if (responseHeaders !== undefined && responseHeaders['entries'] !== undefined) {
|
||||
for (const item of responseHeaders['entries']) {
|
||||
res.setHeader(item['name'], item['value'])
|
||||
res.setHeader(item['name'], item['value']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -759,7 +759,11 @@ export class Workflow {
|
|||
}
|
||||
};
|
||||
|
||||
return this.getParameterValue(parameterValue, runData, runIndex, itemIndex, node.name, connectionInputData);
|
||||
// Resolve the "outer" main values
|
||||
const returnData = this.getParameterValue(parameterValue, runData, runIndex, itemIndex, node.name, connectionInputData);
|
||||
|
||||
// Resolve the "inner" values
|
||||
return this.getParameterValue(returnData, runData, runIndex, itemIndex, node.name, connectionInputData);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue