refactor(core): Port endpoints config (no-changelog) (#10268)

This commit is contained in:
Iván Ovejero
2024-07-31 17:45:11 +02:00
committed by GitHub
parent d91eb2cdd5
commit 1608d2527b
21 changed files with 275 additions and 228 deletions

View File

@@ -66,7 +66,7 @@ export class FrontendService {
private initSettings() {
const instanceBaseUrl = this.urlService.getInstanceBaseUrl();
const restEndpoint = config.getEnv('endpoints.rest');
const restEndpoint = this.globalConfig.endpoints.rest;
const telemetrySettings: ITelemetrySettings = {
enabled: config.getEnv('diagnostics.enabled'),
@@ -88,11 +88,11 @@ export class FrontendService {
isDocker: this.isDocker(),
databaseType: this.globalConfig.database.type,
previewMode: process.env.N8N_PREVIEW_MODE === 'true',
endpointForm: config.getEnv('endpoints.form'),
endpointFormTest: config.getEnv('endpoints.formTest'),
endpointFormWaiting: config.getEnv('endpoints.formWaiting'),
endpointWebhook: config.getEnv('endpoints.webhook'),
endpointWebhookTest: config.getEnv('endpoints.webhookTest'),
endpointForm: this.globalConfig.endpoints.form,
endpointFormTest: this.globalConfig.endpoints.formTest,
endpointFormWaiting: this.globalConfig.endpoints.formWaiting,
endpointWebhook: this.globalConfig.endpoints.webhook,
endpointWebhookTest: this.globalConfig.endpoints.webhookTest,
saveDataErrorExecution: config.getEnv('executions.saveDataOnError'),
saveDataSuccessExecution: config.getEnv('executions.saveDataOnSuccess'),
saveManualExecutions: config.getEnv('executions.saveDataManualExecutions'),
@@ -246,7 +246,7 @@ export class FrontendService {
getSettings(pushRef?: string): IN8nUISettings {
this.internalHooks.onFrontendSettingsAPI(pushRef);
const restEndpoint = config.getEnv('endpoints.rest');
const restEndpoint = this.globalConfig.endpoints.rest;
// Update all urls, in case `WEBHOOK_URL` was updated by `--tunnel`
const instanceBaseUrl = this.urlService.getInstanceBaseUrl();