fix(Webhook Node): Fix URL params for webhooks (#6986)

Fixes:

https://community.n8n.io/t/empty-params-variables-in-webhook-node-after-upgrading-to-n8n-1-3-1/29624
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-08-25 13:28:32 +02:00
committed by GitHub
parent 87cf1d9c1b
commit 596b5695cd
5 changed files with 93 additions and 26 deletions

View File

@@ -194,6 +194,9 @@ export class ActiveWorkflowRunner implements IWebhookManager {
Logger.debug(`Received webhook "${httpMethod}" for path "${path}"`);
// Reset request parameters
request.params = {} as WebhookRequest['params'];
// Remove trailing slash
if (path.endsWith('/')) {
path = path.slice(0, -1);

View File

@@ -56,6 +56,9 @@ export class TestWebhooks implements IWebhookManager {
const httpMethod = request.method;
let path = request.params.path;
// Reset request parameters
request.params = {} as WebhookRequest['params'];
// Remove trailing slash
if (path.endsWith('/')) {
path = path.slice(0, -1);

View File

@@ -32,6 +32,9 @@ export class WaitingWebhooks implements IWebhookManager {
const { path: executionId, suffix } = req.params;
Logger.debug(`Received waiting-webhook "${req.method}" for execution "${executionId}"`);
// Reset request parameters
req.params = {} as WaitingWebhookRequest['params'];
const execution = await this.executionRepository.findSingleExecution(executionId, {
includeData: true,
unflattenData: true,