Fixed when not using reverse proxy !wip

pull/1529/head
tidusjar 7 years ago
parent bf04120429
commit 1a61f0dbe6

@ -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…
Cancel
Save