Skip to content

Commit

Permalink
fix(core): Add an option to add additional non-ui routes (no-changelo…
Browse files Browse the repository at this point in the history
…g) (#9122)
  • Loading branch information
netroy committed Apr 11, 2024
1 parent 86a20f6 commit 1b199c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/cli/src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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('|')})/?.*$`);

Expand Down
6 changes: 6 additions & 0 deletions packages/cli/src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 1b199c0

Please sign in to comment.