add custom server address

This commit is contained in:
Joe Dowd
2020-02-07 00:40:01 +00:00
parent feda7fd1a0
commit dd08ff1507
6 changed files with 70 additions and 3 deletions

View File

@@ -240,7 +240,9 @@ class Utils {
sendRequestToServer(type: string, address: string, callback?: (xmlhttp: XMLHttpRequest, err: boolean) => any) {
let xmlhttp = new XMLHttpRequest();
xmlhttp.open(type, CompileConfig.serverAddress + address, true);
let serverAddress = (Config.config.customServerAddress) ? Config.config.customServerAddress : CompileConfig.serverAddress;
xmlhttp.open(type, serverAddress + address, true);
if (callback != undefined) {
xmlhttp.onreadystatechange = function () {