mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 12:52:05 +00:00
use git commit hash verification when replaying archived games (#204)
This commit is contained in:
@@ -100,6 +100,8 @@ export interface ServerConfig {
|
||||
env(): GameEnv;
|
||||
adminToken(): string;
|
||||
adminHeader(): string;
|
||||
// Only available on the server
|
||||
gitCommit(): string;
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
|
||||
@@ -22,6 +22,9 @@ import { pastelTheme } from "./PastelTheme";
|
||||
import { pastelThemeDark } from "./PastelThemeDark";
|
||||
|
||||
export abstract class DefaultServerConfig implements ServerConfig {
|
||||
gitCommit(): string {
|
||||
return process.env.GIT_COMMIT;
|
||||
}
|
||||
adminHeader(): string {
|
||||
return "x-admin-key";
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ export class DevServerConfig extends DefaultServerConfig {
|
||||
numWorkers(): number {
|
||||
return 2;
|
||||
}
|
||||
gitCommit(): string {
|
||||
return "DEV";
|
||||
}
|
||||
}
|
||||
|
||||
export class DevConfig extends DefaultConfig {
|
||||
|
||||
Reference in New Issue
Block a user