Import the committed KnowledgeFS snapshot dc4072ee302317145612087ce7440851dc329fd0 under knowledge-fs/ without its Git history, local IDE settings, or build artifacts.
12 lines
348 B
TypeScript
12 lines
348 B
TypeScript
const DEFAULT_LOCAL_AUTH_TOKEN = "dev-token";
|
|
|
|
export function getAdminServerToken(): string | null {
|
|
const explicit =
|
|
process.env.KNOWLEDGE_ADMIN_BFF_TOKEN?.trim() || process.env.KNOWLEDGE_DEV_AUTH_TOKEN?.trim();
|
|
if (explicit) {
|
|
return explicit;
|
|
}
|
|
|
|
return process.env.NODE_ENV === "production" ? null : DEFAULT_LOCAL_AUTH_TOKEN;
|
|
}
|