fix(mcp): accept both MCPSECRET and MCP_SECRET

This commit is contained in:
Chris Christiansen 2026-09-05 17:51:03 +00:00
parent 97c7b1794d
commit 14d61b131f

View File

@ -66,7 +66,8 @@ logger.info(f"OLLAMA_BASE_URL: {OLLAMA_BASE_URL}")
# ---------------------------------------------------------------------------
async def _verify_auth(request: Request) -> None:
secret = os.getenv("MCPSECRET", "").strip()
secret = os.getenv("MCPSECRET") or os.getenv("MCP_SECRET", "")
secret = secret.strip()
if not secret:
logger.error("MCPSECRET is not configured on the server.")
raise HTTPException(status_code=500, detail="MCPSECRET not configured")