Skip to content

Commit bff1a56

Browse files
committed
Change DEFAULT_SERVER_URL for intranet
1 parent 5c61807 commit bff1a56

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ 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 readonly DEFAULT_SERVER_URL = ServerWithCompressConfigurator.determineServerUrl()
9+
static readonly INTRANET_SERVER_URL = "https://ij-perf-api.labs.jb.gg"
910

1011
private readonly observable: Observable<null>
1112
private _serverUrl: string = ServerWithCompressConfigurator.DEFAULT_SERVER_URL
@@ -26,6 +27,14 @@ export class ServerWithCompressConfigurator implements ServerConfigurator {
2627
)
2728
}
2829

30+
private static determineServerUrl(): string {
31+
if (window.location.hostname === "ij-perf-api.labs.jb.gg") {
32+
return ServerWithCompressConfigurator.INTRANET_SERVER_URL
33+
} else {
34+
return "https://ij-perf.labs.jb.gg"
35+
}
36+
}
37+
2938
get serverUrl(): string {
3039
return this._serverUrl
3140
}

0 commit comments

Comments
 (0)