use admin key token for admin auth

This commit is contained in:
Evan
2025-03-04 08:43:17 -08:00
parent 62c4887fbb
commit 6a22d58281
5 changed files with 20 additions and 34 deletions
+7 -1
View File
@@ -22,6 +22,12 @@ import { pastelTheme } from "./PastelTheme";
import { pastelThemeDark } from "./PastelThemeDark";
export abstract class DefaultServerConfig implements ServerConfig {
adminHeader(): string {
return "x-admin-key";
}
adminToken(): string {
return process.env.ADMIN_TOKEN;
}
numWorkers(): number {
return 2;
}
@@ -183,7 +189,7 @@ export class DefaultConfig implements Config {
return {
cost: (p: Player) =>
p.type() == PlayerType.Human && this.infiniteGold()
? 0
? 25
: 25_000_000,
territoryBound: false,
};