2018-05-12 12:19:51 -04:00
|
|
|
import {PublicConfigClass} from './ConfigClass';
|
|
|
|
import {WebConfigLoader} from 'typeconfig/src/WebConfigLoader';
|
2017-06-04 15:25:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
declare module ServerInject {
|
2018-11-28 23:49:33 +01:00
|
|
|
export const ConfigInject: PublicConfigClass;
|
2017-06-04 15:25:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export let Config = new PublicConfigClass();
|
|
|
|
|
2017-07-09 12:03:17 +02:00
|
|
|
|
2018-05-12 12:19:51 -04:00
|
|
|
if (typeof ServerInject !== 'undefined' && typeof ServerInject.ConfigInject !== 'undefined') {
|
2017-06-11 23:33:47 +02:00
|
|
|
WebConfigLoader.loadFrontendConfig(Config.Client, ServerInject.ConfigInject);
|
2017-06-04 15:25:08 +02:00
|
|
|
}
|
|
|
|
|
2017-07-09 12:03:17 +02:00
|
|
|
|
2018-05-12 12:19:51 -04:00
|
|
|
if (Config.Client.publicUrl === '') {
|
2017-07-09 12:03:17 +02:00
|
|
|
Config.Client.publicUrl = location.origin;
|
|
|
|
}
|
|
|
|
|