mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Experimental, set the Webpack base root to the ombi base path if we have it. This should hopefully fix the reverse proxy issues
This commit is contained in:
parent
a7687f6dea
commit
8c05672c6b
3 changed files with 12 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
|||
import { Component, OnInit } from "@angular/core";
|
||||
import { PlatformLocation } from "@angular/common";
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { NavigationStart, Router } from "@angular/router";
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
import { AuthService } from "./auth/auth.service";
|
||||
|
@ -32,7 +33,14 @@ export class AppComponent implements OnInit {
|
|||
private readonly settingsService: SettingsService,
|
||||
private readonly jobService: JobService,
|
||||
public readonly translate: TranslateService,
|
||||
private readonly identityService: IdentityService) {
|
||||
private readonly identityService: IdentityService,
|
||||
private readonly platformLocation: PlatformLocation) {
|
||||
|
||||
const base = this.platformLocation.getBaseHrefFromDOM();
|
||||
if (base.length > 1) {
|
||||
__webpack_public_path__ = base + "/dist/";
|
||||
}
|
||||
|
||||
this.translate.addLangs(["en", "de", "fr","da","es","it","nl","sv","no"]);
|
||||
// this language will be used as a fallback when a translation isn't found in the current language
|
||||
this.translate.setDefaultLang("en");
|
||||
|
|
|
@ -18,12 +18,6 @@ import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
|
|||
import { AppModule } from "./app/app.module";
|
||||
|
||||
declare var module: any;
|
||||
declare var __webpack_public_path__: any;
|
||||
__webpack_public_path__ = "Test/";
|
||||
|
||||
if(__webpack_public_path__) {
|
||||
//
|
||||
}
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept();
|
||||
|
|
2
src/Ombi/typings/globals/globals.d.ts
vendored
2
src/Ombi/typings/globals/globals.d.ts
vendored
|
@ -5,6 +5,8 @@ declare var require: any;
|
|||
declare var localStorage: any;
|
||||
declare var introJs: any;
|
||||
|
||||
declare var __webpack_public_path__: any;
|
||||
|
||||
declare module "pace-progress";
|
||||
declare module "webpack-bundle-analyzer";
|
||||
declare module "uglifyjs-webpack-plugin";
|
Loading…
Add table
Add a link
Reference in a new issue