From 63bc4097e00063d7dbad0726484d43070004ab01 Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Thu, 12 Aug 2021 11:22:44 +0200 Subject: [PATCH] :zap: Automatically add trailing slash to webhook urls (#2076) * Add trailing slash to webhook url if not present Relates to community post https://community.n8n.io/t/problem-with-google-calendar-credentials/7232 We'll be adding a trailing slash as it's a requisite. * Adding slash to all cases. --- packages/cli/src/WebhookHelpers.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cli/src/WebhookHelpers.ts b/packages/cli/src/WebhookHelpers.ts index f0d5f63818..4f6c540bf8 100644 --- a/packages/cli/src/WebhookHelpers.ts +++ b/packages/cli/src/WebhookHelpers.ts @@ -463,6 +463,9 @@ export function getWebhookBaseUrl() { // @ts-ignore urlBaseWebhook = process.env.WEBHOOK_TUNNEL_URL || process.env.WEBHOOK_URL; } + if (!urlBaseWebhook.endsWith('/')) { + urlBaseWebhook += '/'; + } return urlBaseWebhook; }