fix(core): Add an option to add additional non-ui routes (no-changelog) (#9122)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-04-11 12:20:29 +02:00 committed by GitHub
parent 86a20f6563
commit 1b199c08ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -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('|')})/?.*$`);

View file

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