diff --git a/.project b/.project
index 73874d789c..564dd731bd 100644
--- a/.project
+++ b/.project
@@ -5,7 +5,24 @@
+
+ org.eclipse.buildship.core.gradleprojectbuilder
+
+
+
+ org.eclipse.buildship.core.gradleprojectnature
+
+
+ 1687118849170
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/app/scripts/initialTasks.js b/app/scripts/initialTasks.js
index bef273bb63..4a86ebb99d 100644
--- a/app/scripts/initialTasks.js
+++ b/app/scripts/initialTasks.js
@@ -5,11 +5,15 @@
var baseApiUrl = "https://demo.mifos.io";
var host = "";
var portNumber = "";
+
+ // Extract the last two parts of the hostname
+ var lastTwoParts = mainLink.hostname.split('.').slice(-2).join('.');
+
//accessing from openmf server
- if (mainLink.hostname.indexOf('mifos.io') >= 0) {
- var hostname = window.location.hostname;
+ if (lastTwoParts === 'mifos.io') {
+ var hostname = mainLink.hostname;
console.log('hostname---' + hostname);
- domains = hostname.split('.');
+ var domains = hostname.split('.');
console.log('domains---' + domains);
// For multi tenant hosting
if (domains[0] == "demo") {
@@ -96,4 +100,4 @@ QueryParameters = (function () {
}
}
return result;
-}());
+}());
\ No newline at end of file