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: {