[ACA-2214] Sharing URL being constructed from ECM Host incorrectly (#981)

* fix baseShareUrl defaults

* allow controlling full path

* unit test

* update tomcat settings

* use single slash

* simplify documentation
This commit is contained in:
Denys Vuika
2019-03-01 07:15:08 +00:00
committed by GitHub
parent 229e23f61d
commit 830357e892
5 changed files with 43 additions and 41 deletions
+6 -5
View File
@@ -147,10 +147,11 @@ export class AppComponent implements OnInit, OnDestroy {
});
}
private loadAppSettings() {
const baseShareUrl =
this.config.get<string>('baseShareUrl') ||
this.config.get<string>('ecmHost');
loadAppSettings() {
let baseShareUrl = this.config.get<string>('baseShareUrl');
if (!baseShareUrl.endsWith('/')) {
baseShareUrl += '/';
}
const state: AppState = {
...INITIAL_APP_STATE,
@@ -158,7 +159,7 @@ export class AppComponent implements OnInit, OnDestroy {
appName: this.config.get<string>('application.name'),
headerColor: this.config.get<string>('headerColor'),
logoPath: this.config.get<string>('application.logo'),
sharedUrl: `${baseShareUrl}/#/preview/s/`
sharedUrl: baseShareUrl
};
this.store.dispatch(new SetInitialStateAction(state));