diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index b9e4495b7..87ecee798 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -14,9 +14,9 @@ export const environment = { // For connecting to others servers running elsewhere update the base API URL baseApiUrls: 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 - baseApiUrl: loadedEnv['fineractApiUrl'] || window.location.protocol + '//' + window.location.hostname, + baseApiUrl: loadedEnv['fineractApiUrl'] || window.location.origin, oauthServerUrl: loadedEnv['oauthServerUrl'] || loadedEnv['fineractApiUrl'] + loadedEnv['apiProvider'], allowServerSwitch: env.allow_switching_backend_instance, apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 2c1d6e1fc..3aa0a1a55 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -19,15 +19,9 @@ export const environment = { // For connecting to others servers running elsewhere update the base API URL baseApiUrls: loadedEnv['fineractApiUrls'] || - 'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + - window.location.protocol + - '//' + - window.location.hostname + - ':' + - window.location.port, + '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 - baseApiUrl: - loadedEnv['baseApiUrl'] || window.location.protocol + '//' + window.location.hostname + ':' + window.location.port, + baseApiUrl: loadedEnv['baseApiUrl'] || window.location.origin, allowServerSwitch: env.allow_switching_backend_instance, apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api', apiVersion: loadedEnv['apiVersion'] || '/v1',