Remove env endpoint and mark live APIs no-store

This commit is contained in:
scamiv
2026-03-22 20:43:01 +01:00
parent e003ffc468
commit 0635daa742
8 changed files with 50 additions and 45 deletions
+3 -12
View File
@@ -40,20 +40,11 @@ export async function getServerConfigFromClient(): Promise<ServerConfig> {
}
const bootstrapGameEnv = window.BOOTSTRAP_CONFIG?.gameEnv;
if (bootstrapGameEnv) {
cachedSC = getServerConfig(bootstrapGameEnv);
return cachedSC;
if (!bootstrapGameEnv) {
throw new Error("Missing bootstrap server config");
}
const response = await fetch("/api/env");
if (!response.ok) {
throw new Error(
`Failed to fetch server config: ${response.status} ${response.statusText}`,
);
}
const config = await response.json();
cachedSC = getServerConfig(config.game_env);
cachedSC = getServerConfig(bootstrapGameEnv);
return cachedSC;
}
export function getServerConfigFromServer(): ServerConfig {