From ba1cc9bfa51705d8808cefd74c31d1e686fcee25 Mon Sep 17 00:00:00 2001 From: Mahendra Paipuri Date: Fri, 19 Apr 2024 11:55:28 +0200 Subject: [PATCH] fix: Preserve settings from provisioning * Config reload should not override the appUrl and skipTlsCheck parameters from provisioning Signed-off-by: Mahendra Paipuri --- src/components/AppConfig/AppConfig.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/AppConfig/AppConfig.tsx b/src/components/AppConfig/AppConfig.tsx index c2097eb..02ff2ce 100755 --- a/src/components/AppConfig/AppConfig.tsx +++ b/src/components/AppConfig/AppConfig.tsx @@ -70,7 +70,9 @@ export const AppConfig = ({ plugin }: Props) => { persistDataChanged: false, }); - const appUrl = config.appUrl; + // appUrl and skipTlsCheck configured from provisioning will + // always have higher precedence to default values + const appUrl = jsonData?.appUrl || config.appUrl; const skipTlsCheck = jsonData?.skipTlsCheck || false; const orientationOptions = [