X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fskyquake.js;fp=skyquake%2Fskyquake.js;h=726757fbbddafde334177d63aeaef2cc2237c963;hp=b9af78affd72d49cf53070c2f8db1fef9838ef3e;hb=625a4c2118c4d095daf2a264643798eddf4d0491;hpb=b6bb9b5e3f414e408ea622cc4b0753b7f19d6242 diff --git a/skyquake/skyquake.js b/skyquake/skyquake.js index b9af78aff..726757fbb 100644 --- a/skyquake/skyquake.js +++ b/skyquake/skyquake.js @@ -83,6 +83,9 @@ if (cluster.isMaster && clusteredLaunch) { var sslOptions = null; + var apiServer = argv['api-server'] ? argv['api-server'] : 'localhost'; + var uploadServer = argv['upload-server'] ? argv['upload-server'] : null; + try { if (argv['enable-https']) { var keyFilePath = argv['keyfile-path']; @@ -194,9 +197,16 @@ if (cluster.isMaster && clusteredLaunch) { app.use(inactivity_routes); // Configure global config with ssl enabled/disabled - configurationAPI.globalConfiguration.update({ - ssl_enabled: httpsConfigured - }); + var globalConfig = { + ssl_enabled: httpsConfigured, + api_server: apiServer + }; + + if (uploadServer) { + globalConfig.upload_server = uploadServer; + } + + configurationAPI.globalConfiguration.update(globalConfig); // Configure configuration route(s) app.use(configuration_routes);