Skip to content

Commit 498b80d

Browse files
authored
Merge pull request #2644 from gkbishnoi07/WEB-309-fineract-client-services-bypass-server-selection-and-make-requests-to-localhost
WEB-309 @fineract/client services bypass server selection and make requests to localhost
2 parents 36e18e4 + 56a7d79 commit 498b80d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/app/app.module.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ import { ProfileModule } from './profile/profile.module';
4141
import { TasksModule } from './tasks/tasks.module';
4242
import { ConfigurationWizardModule } from './configuration-wizard/configuration-wizard.module';
4343
import { PortalModule } from '@angular/cdk/portal';
44-
import { ApiModule } from '@fineract/client';
45-
import { BASE_PATH } from '@fineract/client';
44+
import { ApiModule, Configuration, BASE_PATH } from '@fineract/client';
4645
import { SettingsService } from './settings/settings.service';
4746

4847
/** Main Routing Module */
@@ -121,6 +120,12 @@ export function HttpLoaderFactory(http: HttpClient) {
121120
CollectionsModule,
122121
TasksModule,
123122
ConfigurationWizardModule,
123+
ApiModule.forRoot(
124+
() =>
125+
new Configuration({
126+
basePath: '' // Empty so ApiPrefixInterceptor handles all URL construction
127+
})
128+
),
124129
AppRoutingModule,
125130
NotFoundComponent,
126131
CallbackComponent
@@ -133,6 +138,10 @@ export function HttpLoaderFactory(http: HttpClient) {
133138
provide: HTTP_INTERCEPTORS,
134139
useClass: !environment.OIDC.oidcServerEnabled ? TokenInterceptor : ZitadelTokenInterceptor,
135140
multi: true
141+
},
142+
{
143+
provide: BASE_PATH,
144+
useValue: '' // Empty so ApiPrefixInterceptor handles all URL construction
136145
}
137146
]
138147
})

0 commit comments

Comments
 (0)