Skip to content

Commit

Permalink
Support same url with subdomain as backend server url
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Alberto Hernandez authored and alberto-art3ch committed May 22, 2024
1 parent a41df49 commit 3b714fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const environment = {
baseApiUrls: window['env']['fineractApiUrls'] ||
'https://dev.mifos.io,https://demo.mifos.io,https://qa.mifos.io,https://staging.mifos.io,https://mobile.mifos.io,https://demo.fineract.dev,https://localhost:8443',
// For connecting to server running elsewhere set the base API URL
baseApiUrl: window['env']['fineractApiUrl'] || 'https://demo.fineract.dev',
baseApiUrl: window['env']['fineractApiUrl'] || window.location.protocol + '://' + window.location.hostname,
allowServerSwitch: env.allow_switching_backend_instance,
apiProvider: window['env']['apiProvider'] || '/fineract-provider/api',
apiVersion: window['env']['apiVersion'] || '/v1',
Expand Down
4 changes: 2 additions & 2 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export const environment = {
fineractPlatformTenantIds: window['env']['fineractPlatformTenantIds'] || 'default',
// For connecting to others servers running elsewhere update the base API URL
baseApiUrls: window['env']['fineractApiUrls'] ||
'https://dev.mifos.io,https://demo.mifos.io,https://qa.mifos.io,https://staging.mifos.io,https://mobile.mifos.io,https://demo.fineract.dev,https://localhost:8443,http://localhost:8443',
'https://dev.mifos.io,https://demo.mifos.io,https://qa.mifos.io,https://staging.mifos.io,https://mobile.mifos.io,https://demo.fineract.dev,https://localhost:8443,' + window.location.protocol + '://' + window.location.hostname + ':' + window.location.port,
// For connecting to server running elsewhere set the base API URL
baseApiUrl: window['env']['baseApiUrl'] || 'https://demo.fineract.dev',
baseApiUrl: window['env']['baseApiUrl'] || window.location.protocol + '://' + window.location.hostname + ':' + window.location.port,
allowServerSwitch: env.allow_switching_backend_instance,
apiProvider: window['env']['apiProvider'] || '/fineract-provider/api',
apiVersion: window['env']['apiVersion'] || '/v1',
Expand Down

0 comments on commit 3b714fe

Please sign in to comment.