From e079ce4d3f59316a733e8d46e76615c588b20d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Thu, 11 Apr 2024 10:39:26 +0200 Subject: [PATCH] fix(core): Add an option to add additional non-ui routes (no-changelog) --- packages/cli/src/Server.ts | 1 + packages/cli/src/config/schema.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index 7aa8a663c3a06..37db779c1f71a 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -256,6 +256,7 @@ export class Server extends AbstractServer { this.restEndpoint, this.endpointPresetCredentials, isApiEnabled() ? '' : publicApiEndpoint, + ...config.getEnv('endpoints.additionalNonUIRoutes').split(':'), ].filter((u) => !!u); const nonUIRoutesRegex = new RegExp(`^/(${nonUIRoutes.join('|')})/?.*$`); diff --git a/packages/cli/src/config/schema.ts b/packages/cli/src/config/schema.ts index 271cfa6743598..c4177548c6f01 100644 --- a/packages/cli/src/config/schema.ts +++ b/packages/cli/src/config/schema.ts @@ -727,6 +727,12 @@ export const schema = { env: 'N8N_DISABLE_PRODUCTION_MAIN_PROCESS', doc: 'Disable production webhooks from main process. This helps ensures no http traffic load to main process when using webhook-specific processes.', }, + additionalNonUIRoutes: { + doc: 'Additional endpoints to not open the UI on. Multiple endpoints can be separated by colon (":")', + format: String, + default: '', + env: 'N8N_ADDITIONAL_NON_UI_ROUTES', + }, }, publicApi: {