Skip to content

Commit 440b3be

Browse files
committed
Change DEFAULT_SERVER_URL for intranet and localhost
1 parent 9f70f91 commit 440b3be

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dashboard/new-dashboard/src/configurators/ServerWithCompressConfigurator.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ import { dbTypeStore } from "../shared/dbTypes"
55
import { injectOrError, serverUrlObservableKey } from "../shared/injectionKeys"
66

77
export class ServerWithCompressConfigurator implements ServerConfigurator {
8-
static readonly DEFAULT_SERVER_URL = "https://ij-perf.labs.jb.gg"
8+
static getDefaultServerUrl(): string {
9+
const hostname = window.location.hostname
10+
if (hostname === "ij-perf-api.labs.jb.gg" || hostname === "localhost") {
11+
return "https://ij-perf-api.labs.jb.gg"
12+
}
13+
return "https://ij-perf.labs.jb.gg"
14+
}
15+
16+
static readonly DEFAULT_SERVER_URL = ServerWithCompressConfigurator.getDefaultServerUrl()
917

1018
private readonly observable: Observable<null>
1119
private _serverUrl: string = ServerWithCompressConfigurator.DEFAULT_SERVER_URL

0 commit comments

Comments
 (0)