From e1603d8a244f7514a5385e2755cd6576b3d5fcb4 Mon Sep 17 00:00:00 2001 From: Mario Romano Date: Thu, 18 Aug 2016 12:34:13 +0100 Subject: [PATCH] replace hardcoded ip with dynamic local ip --- demo-shell-ng2/app/app.component.ts | 4 ++-- .../src/services/AlfrescoSettingsService.service.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demo-shell-ng2/app/app.component.ts b/demo-shell-ng2/app/app.component.ts index b8686f0f2e..415c37fcc2 100644 --- a/demo-shell-ng2/app/app.component.ts +++ b/demo-shell-ng2/app/app.component.ts @@ -41,8 +41,8 @@ export class AppComponent { translate: AlfrescoTranslationService; searchTerm: string = ''; - ecmHost: string = 'http://127.0.0.1:8080'; - bpmHost: string = 'http://127.0.0.1:9999'; + ecmHost: string = 'http://' + window.location.hostname + ':8080'; + bpmHost: string = 'http://' + window.location.hostname + ':9999'; constructor(public auth: AlfrescoAuthenticationService, public router: Router, diff --git a/ng2-components/ng2-alfresco-core/src/services/AlfrescoSettingsService.service.ts b/ng2-components/ng2-alfresco-core/src/services/AlfrescoSettingsService.service.ts index d606e8c27a..d3567beb5b 100644 --- a/ng2-components/ng2-alfresco-core/src/services/AlfrescoSettingsService.service.ts +++ b/ng2-components/ng2-alfresco-core/src/services/AlfrescoSettingsService.service.ts @@ -20,8 +20,8 @@ import { Injectable } from '@angular/core'; @Injectable() export class AlfrescoSettingsService { - static DEFAULT_ECM_ADDRESS: string = 'http://127.0.0.1:8080'; - static DEFAULT_BPM_ADDRESS: string = 'http://127.0.0.1:9999'; + static DEFAULT_ECM_ADDRESS: string = 'http://' + window.location.hostname + ':8080'; + static DEFAULT_BPM_ADDRESS: string = 'http://' + window.location.hostname + ':9999'; static DEFAULT_ECM_CONTEXT_PATH: string = '/alfresco'; static DEFAULT_BPM_CONTEXT_PATH: string = '/activiti-app';