Skip to content

Commit 5c61807

Browse files
committed
Revert temp fixes
1 parent 758ded8 commit 5c61807

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

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

+1-11
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import { injectOrError, serverUrlObservableKey } from "../shared/injectionKeys"
66

77
export class ServerWithCompressConfigurator implements ServerConfigurator {
88
static readonly DEFAULT_SERVER_URL = "https://ij-perf.labs.jb.gg"
9-
static readonly INTRANET_SERVER_URL = "https://ij-perf-api.labs.jb.gg"
109

1110
private readonly observable: Observable<null>
12-
private _serverUrl: string = this.determineServerUrl()
11+
private _serverUrl: string = ServerWithCompressConfigurator.DEFAULT_SERVER_URL
1312

1413
constructor(
1514
readonly db: string,
@@ -31,15 +30,6 @@ export class ServerWithCompressConfigurator implements ServerConfigurator {
3130
return this._serverUrl
3231
}
3332

34-
private determineServerUrl(): string {
35-
console.log(window.location.hostname)
36-
if (window.location.hostname === "ij-perf-api.labs.jb.gg") {
37-
return ServerWithCompressConfigurator.INTRANET_SERVER_URL
38-
} else {
39-
return ServerWithCompressConfigurator.DEFAULT_SERVER_URL
40-
}
41-
}
42-
4333
compressString(params: string): string {
4434
// eslint-disable-next-line @typescript-eslint/no-unnecessary-template-expression
4535
return `${getCompressor().compress(params)}`

pkg/server/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func Serve(dbUrl string, natsUrl string) error {
8383
router.Use(middleware.AllowContentType("application/octet-stream", "application/json"))
8484
router.Use(cors.New(cors.Options{
8585
AllowedOrigins: []string{"*"},
86-
AllowedMethods: []string{"GET", "POST", "DELETE", "OPTIONS"},
86+
AllowedMethods: []string{"GET", "POST", "DELETE"},
8787
AllowedHeaders: []string{"*"},
8888
MaxAge: 50,
8989
}).Handler)

0 commit comments

Comments
 (0)