From 9caf1678de8537037ef4ab61b7c0a5ff46bff8cf Mon Sep 17 00:00:00 2001 From: Rajitha Kumara Date: Tue, 2 Apr 2024 15:27:55 +0530 Subject: [PATCH] Fix remote url resolving issue --- .../mgt/core/util/FileTransferServiceHelperUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/util/FileTransferServiceHelperUtil.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/util/FileTransferServiceHelperUtil.java index e7ce574c4c..570998ebef 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/util/FileTransferServiceHelperUtil.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/util/FileTransferServiceHelperUtil.java @@ -166,9 +166,10 @@ public class FileTransferServiceHelperUtil { throw new FileTransferServiceHelperUtilException("Received null for download url"); } - if (!Objects.equals(System.getProperty("iot.gateway.host"), downloadUrl.getHost())) { + if (!Objects.equals(System.getProperty("iot.gateway.host"), downloadUrl.getHost()) && + !Objects.equals(System.getProperty("iot.core.host"), downloadUrl.getHost())) { if (log.isDebugEnabled()) { - log.debug("Host not match with " + System.getProperty("iot.gateway.host")); + log.debug("Download URL " + downloadUrl + " contains not matching host"); } return null; }