Webhook: allow setting generic response-headers

This commit is contained in:
Davide Cavestro
2020-04-26 11:01:20 +02:00
parent 538ad3b98d
commit db2329b26c
3 changed files with 70 additions and 0 deletions

View File

@@ -85,6 +85,7 @@ export class Webhook implements INodeType {
responseBinaryPropertyName: '={{$parameter["responseBinaryPropertyName"]}}',
responseContentType: '={{$parameter["options"]["responseContentType"]}}',
responsePropertyName: '={{$parameter["options"]["responsePropertyName"]}}',
responseHeaders: '={{$parameter["options"]["responseHeaders"]}}',
path: '={{$parameter["path"]}}',
},
],
@@ -268,6 +269,39 @@ export class Webhook implements INodeType {
placeholder: 'application/xml',
description: 'Set a custom content-type to return if another one as the "application/json" should be returned.',
},
{
displayName: 'Response Headers',
name: 'responseHeaders',
placeholder: 'Add Response Header',
description: 'Add headers to the webhook response.',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
default: {},
options: [
{
name: 'entries',
displayName: 'Entries',
values: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'Name of the header.',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
description: 'Value of the header.',
},
]
},
],
},
{
displayName: 'Property Name',
name: 'responsePropertyName',