aboutsummaryrefslogtreecommitdiff
path: root/webAO/master.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/master.ts')
-rw-r--r--webAO/master.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/webAO/master.ts b/webAO/master.ts
index d87c10d..ae0165a 100644
--- a/webAO/master.ts
+++ b/webAO/master.ts
@@ -144,8 +144,8 @@ function checkOnline(serverID: number, coIP: string) {
// Fetches the serverlist from the masterserver
// Returns a properly typed list of servers
async function getServerlist(): Promise<AOServer[]> {
- // get if we're on http or https
- const response = await fetch(protocol + '//servers.aceattorneyonline.com/servers');
+ const url = `${protocol}//${serverlist_domain}/servers`;
+ const response = await fetch(url);
if (!response.ok) {
console.error(`Bad status code from masterserver. status: ${response.status}, body: ${response.body}`);
@@ -210,8 +210,8 @@ function getCachedServerlist(): AOServer[] {
}
function processServerlist(serverlist: AOServer[]) {
- const domain = window.location.hostname;
- const clientURL: string = `${protocol}//${domain}/client.html`;
+ const host = window.location.host;
+ const clientURL: string = `${protocol}//${host}/client.html`;
for (let i = 0; i < serverlist.length - 1; i++) {
const server = serverlist[i];
let port = 0;