diff --git a/src/Ombi/ClientApp/src/app/app.module.ts b/src/Ombi/ClientApp/src/app/app.module.ts
index 1526e0295..e06740d9a 100644
--- a/src/Ombi/ClientApp/src/app/app.module.ts
+++ b/src/Ombi/ClientApp/src/app/app.module.ts
@@ -83,9 +83,9 @@ const routes: Routes = [
// AoT requires an exported function for factories
export function HttpLoaderFactory(http: HttpClient, platformLocation: PlatformLocation) {
// const base = getBaseLocation();
- const base = platformLocation.getBaseHrefFromDOM();
+ const base = '/' + (window.location.pathname.split('/')[1] || '')
const version = Math.floor(Math.random() * 999999999);
- if (base.length > 1) {
+ if (base !== null && base.length > 1) {
return new TranslateHttpLoader(http, `${base}/translations/`, `.json?v=${version}`);
}
return new TranslateHttpLoader(http, "/translations/", `.json?v=${version}`);
@@ -181,11 +181,10 @@ export function JwtTokenGetter() {
MessageService,
StorageService,
SignalRNotificationService,
- { provide: APP_BASE_HREF, useValue: window['_app_base'] || '/' }
- // {
- // provide: APP_BASE_HREF,
- // useFactory: getBaseLocation
- // }
+ {
+ provide: APP_BASE_HREF,
+ useValue: '/' + (window.location.pathname.split('/')[1] || '')
+ }
],
bootstrap: [AppComponent],
})
diff --git a/src/Ombi/ClientApp/src/index.html b/src/Ombi/ClientApp/src/index.html
index 8cca37e00..679997c40 100644
--- a/src/Ombi/ClientApp/src/index.html
+++ b/src/Ombi/ClientApp/src/index.html
@@ -5,43 +5,43 @@