From 2c2a40405646aa97e92259489a2a0b841a928adb Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Fri, 24 Jan 2025 07:45:47 +0100 Subject: [PATCH] feat(services/config): rename syncProxy to syncServerProxy for naming consistency backwards compatibility ensured, by still checking the iniConfig for the old value first --- config-sample.ini | 2 +- src/services/config.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config-sample.ini b/config-sample.ini index 039a78516..90c7fa17e 100644 --- a/config-sample.ini +++ b/config-sample.ini @@ -31,4 +31,4 @@ trustedReverseProxy=false [Sync] #syncServerHost= #syncServerTimeout= -#syncProxy= \ No newline at end of file +#syncServerProxy= \ No newline at end of file diff --git a/src/services/config.ts b/src/services/config.ts index c851503d0..dbbf644b5 100644 --- a/src/services/config.ts +++ b/src/services/config.ts @@ -83,10 +83,9 @@ const config: TriliumConfig = { syncServerTimeout: process.env.TRILIUM_SYNC_SERVER_TIMEOUT || iniConfig?.Sync?.syncServerTimeout || "120000", - // @TriliumNextTODO: check if we can rename misnamed syncProxy to syncServerProxy without - // breaking backwards compatibility - for naming consistency syncProxy: - process.env.TRILIUM_SYNC_SERVER_PROXY || iniConfig?.Sync?.syncProxy || "" + // additionally checking in iniConfig for inconsistently named syncProxy for backwards compatibility + process.env.TRILIUM_SYNC_SERVER_PROXY || iniConfig?.Sync?.syncProxy || iniConfig?.Sync?.syncServerProxy || "" } };