feat(Webhook Node): Add notices about using the 'Content-Type' header (#17739)

This commit is contained in:
RomanDavydchuk
2025-07-29 19:23:21 +03:00
committed by GitHub
parent 724b5a51f2
commit 1c5a27d3ee
2 changed files with 26 additions and 3 deletions

View File

@@ -23,9 +23,9 @@ import {
} from 'n8n-workflow';
import type { Readable } from 'stream';
import { formatPrivateKey, generatePairedItemData } from '../../utils/utilities';
import { configuredOutputs } from './utils/outputs';
import { getBinaryResponse } from './utils/binary';
import { configuredOutputs } from './utils/outputs';
import { formatPrivateKey, generatePairedItemData } from '../../utils/utilities';
const respondWithProperty: INodeProperties = {
displayName: 'Respond With',
@@ -252,7 +252,18 @@ export class RespondToWebhook implements INodeType {
},
description: 'The name of the node input field with the binary data',
},
{
displayName:
'To avoid unexpected behavior, add a "Content-Type" response header with the appropriate value',
name: 'contentTypeNotice',
type: 'notice',
default: '',
displayOptions: {
show: {
respondWith: ['text'],
},
},
},
{
displayName: 'Options',
name: 'options',

View File

@@ -175,6 +175,18 @@ export class Webhook extends Node {
},
responseDataProperty,
responseBinaryPropertyNameProperty,
{
displayName:
'If you are sending back a response, add a "Content-Type" response header with the appropriate value to avoid unexpected behavior',
name: 'contentTypeNotice',
type: 'notice',
default: '',
displayOptions: {
show: {
responseMode: ['onReceived'],
},
},
},
{
...optionsProperty,