mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Dynamic webhooks improvements (#1396)
* ⚡ remove trailing slash in routes * 🔧 update logic to select dynamicWebhook * 🐛 fix logic in static route matching
This commit is contained in:
@@ -765,9 +765,12 @@ export function getNodeWebhooks(workflow: Workflow, node: INode, additionalData:
|
||||
|
||||
nodeWebhookPath = nodeWebhookPath.toString();
|
||||
|
||||
if (nodeWebhookPath.charAt(0) === '/') {
|
||||
if (nodeWebhookPath.startsWith('/')) {
|
||||
nodeWebhookPath = nodeWebhookPath.slice(1);
|
||||
}
|
||||
if (nodeWebhookPath.endsWith('/')) {
|
||||
nodeWebhookPath = nodeWebhookPath.slice(0, -1);
|
||||
}
|
||||
|
||||
const isFullPath: boolean = workflow.expression.getSimpleParameterValue(node, webhookDescription['isFullPath'], 'internal', false) as boolean;
|
||||
const path = getNodeWebhookPath(workflowId, node, nodeWebhookPath, isFullPath);
|
||||
@@ -827,9 +830,12 @@ export function getNodeWebhooksBasic(workflow: Workflow, node: INode): IWebhookD
|
||||
|
||||
nodeWebhookPath = nodeWebhookPath.toString();
|
||||
|
||||
if (nodeWebhookPath.charAt(0) === '/') {
|
||||
if (nodeWebhookPath.startsWith('/')) {
|
||||
nodeWebhookPath = nodeWebhookPath.slice(1);
|
||||
}
|
||||
if (nodeWebhookPath.endsWith('/')) {
|
||||
nodeWebhookPath = nodeWebhookPath.slice(0, -1);
|
||||
}
|
||||
|
||||
const isFullPath: boolean = workflow.expression.getSimpleParameterValue(node, webhookDescription['isFullPath'], mode, false) as boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user