fix: demo-banner (#305)

This commit is contained in:
Charles GTE
2026-06-02 18:36:35 +02:00
committed by GitHub
parent 564dee512f
commit 09791ae86e
5 changed files with 77 additions and 12 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ import { env } from "@/env.mjs";
* Auth is handled by withApiKey before MCP is ever touched.
* The validated key is forwarded by MCP tools to downstream /api/v1 REST calls.
*/
const apiEnabled = String(env.API_ENABLED) === "true";
const mcpEnabled = String(env.MCP_ENABLED) === "true";
const apiEnabled = env.API_ENABLED;
const mcpEnabled = env.MCP_ENABLED;
export const POST = apiEnabled && mcpEnabled
? withApiKey(async (req: Request, ctx: ApiKeyContext) => {