mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 05:13:18 -07:00
Fixed when not using reverse proxy !wip
This commit is contained in:
parent
bf04120429
commit
1a61f0dbe6
1 changed files with 6 additions and 4 deletions
|
@ -10,8 +10,9 @@ export class ServiceHelpers {
|
|||
protected headers: Headers;
|
||||
|
||||
constructor(protected http: Http, protected url: string, protected platformLocation: PlatformLocation) {
|
||||
if (this.url.length > 1) {
|
||||
this.url = platformLocation.getBaseHrefFromDOM() + this.url;
|
||||
const base = platformLocation.getBaseHrefFromDOM();
|
||||
if (base.length > 1) {
|
||||
this.url = base + this.url;
|
||||
}
|
||||
this.headers = new Headers();
|
||||
this.headers.append("Content-Type", "application/json; charset=utf-8");
|
||||
|
@ -37,8 +38,9 @@ export class ServiceAuthHelpers {
|
|||
protected headers: Headers;
|
||||
|
||||
constructor(protected http: AuthHttp, protected url: string, protected platformLocation: PlatformLocation) {
|
||||
if (this.url.length > 1) {
|
||||
this.url = platformLocation.getBaseHrefFromDOM() + this.url;
|
||||
const base = platformLocation.getBaseHrefFromDOM();
|
||||
if (base.length > 1) {
|
||||
this.url = base + this.url;
|
||||
}
|
||||
this.headers = new Headers();
|
||||
this.headers.append("Content-Type", "application/json; charset=utf-8");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue