From 3cfe8b1b6fa685146837469f4318ff80f9c96cac Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Thu, 15 Jun 2017 13:01:30 +0100 Subject: [PATCH] Fix host configuration in demo-shell when no port is present (#1971) --- demo-shell-ng2/app/app.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo-shell-ng2/app/app.component.ts b/demo-shell-ng2/app/app.component.ts index e63ee99572..53d7dbb042 100644 --- a/demo-shell-ng2/app/app.component.ts +++ b/demo-shell-ng2/app/app.component.ts @@ -29,8 +29,8 @@ declare var document: any; export class AppComponent { searchTerm: string = ''; - ecmHost: string = `http://${window.location.hostname}:${window.location.port}/ecm`; - bpmHost: string = `http://${window.location.hostname}:${window.location.port}/bpm`; + ecmHost: string = `http://${window.location.hostname}` + (window.location.port ? `:${window.location.port}` : '') + `/ecm`; + bpmHost: string = `http://${window.location.hostname}` + (window.location.port ? `:${window.location.port}` : '') + `/bpm`; constructor(private authService: AlfrescoAuthenticationService, private router: Router,