diff --git a/src/scripts/config/constants.js b/src/scripts/config/constants.js index 23b506e..0402fbc 100644 --- a/src/scripts/config/constants.js +++ b/src/scripts/config/constants.js @@ -9,6 +9,7 @@ languagePath: '/langs', languageFileExtension: '.json', defaultLanguage: 'en', + defaultHost: 'localhost', globalStatStorageCapacity: 120, taskStatStorageCapacity: 300, lazySaveTimeout: 500, diff --git a/src/scripts/services/ariaNgSettingService.js b/src/scripts/services/ariaNgSettingService.js index 53e7646..bcebe95 100644 --- a/src/scripts/services/ariaNgSettingService.js +++ b/src/scripts/services/ariaNgSettingService.js @@ -32,7 +32,13 @@ }; var getDefaultRpcHost = function () { - return $location.$$host; + var currentHost = $location.$$host; + + if (currentHost) { + return currentHost; + } + + return ariaNgConstants.defaultHost; }; var setOptions = function (options) {