Support same url with subdomain as backend server url

This commit is contained in:
Adam Saghy
2025-03-14 19:02:31 +00:00
parent 8dbe196d3b
commit ea493973ed
2 changed files with 4 additions and 10 deletions
+2 -2
View File
@@ -14,9 +14,9 @@ export const environment = {
// For connecting to others servers running elsewhere update the base API URL // For connecting to others servers running elsewhere update the base API URL
baseApiUrls: baseApiUrls:
loadedEnv['fineractApiUrls'] || loadedEnv['fineractApiUrls'] ||
'https://https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443', 'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
// For connecting to server running elsewhere set the base API URL // For connecting to server running elsewhere set the base API URL
baseApiUrl: loadedEnv['fineractApiUrl'] || window.location.protocol + '//' + window.location.hostname, baseApiUrl: loadedEnv['fineractApiUrl'] || window.location.origin,
oauthServerUrl: loadedEnv['oauthServerUrl'] || loadedEnv['fineractApiUrl'] + loadedEnv['apiProvider'], oauthServerUrl: loadedEnv['oauthServerUrl'] || loadedEnv['fineractApiUrl'] + loadedEnv['apiProvider'],
allowServerSwitch: env.allow_switching_backend_instance, allowServerSwitch: env.allow_switching_backend_instance,
apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api', apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api',
+2 -8
View File
@@ -19,15 +19,9 @@ export const environment = {
// For connecting to others servers running elsewhere update the base API URL // For connecting to others servers running elsewhere update the base API URL
baseApiUrls: baseApiUrls:
loadedEnv['fineractApiUrls'] || loadedEnv['fineractApiUrls'] ||
'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + 'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
window.location.protocol +
'//' +
window.location.hostname +
':' +
window.location.port,
// For connecting to server running elsewhere set the base API URL // For connecting to server running elsewhere set the base API URL
baseApiUrl: baseApiUrl: loadedEnv['baseApiUrl'] || window.location.origin,
loadedEnv['baseApiUrl'] || window.location.protocol + '//' + window.location.hostname + ':' + window.location.port,
allowServerSwitch: env.allow_switching_backend_instance, allowServerSwitch: env.allow_switching_backend_instance,
apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api', apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api',
apiVersion: loadedEnv['apiVersion'] || '/v1', apiVersion: loadedEnv['apiVersion'] || '/v1',