diff options
| author | David Skoland <davidskoland@gmail.com> | 2023-11-18 14:40:53 +0100 |
|---|---|---|
| committer | David Skoland <davidskoland@gmail.com> | 2023-11-18 14:40:53 +0100 |
| commit | 2ef78433802a434ded890c952849c2e92264ddef (patch) | |
| tree | 440e43799a2cfabd24d2e2d6e8612485ab0aabdc /webAO | |
| parent | bc8fb9800bf9244aa5c5654bd469c2d0b104bbee (diff) | |
Fix host
Diffstat (limited to 'webAO')
| -rw-r--r-- | webAO/master.ts | 8 |
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; |
