Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: add password support for auth header (#832)

cthomasa0befb15a70c
diff --git a/letta/server/rest_api/app.py b/letta/server/rest_api/app.py
index 60a422ea3..de1a64869 100644
--- a/letta/server/rest_api/app.py
+++ b/letta/server/rest_api/app.py
@@ -97,7 +97,10 @@ class CheckPasswordMiddleware(BaseHTTPMiddleware):
if request.url.path == "/v1/health/" or request.url.path == "/latest/health/":
return await call_next(request)
- if request.headers.get("X-BARE-PASSWORD") == f"password {random_password}":
+ if (
+ request.headers.get("X-BARE-PASSWORD") == f"password {random_password}"
+ or request.headers.get("Authorization") == f"Bearer {random_password}"
+ ):
return await call_next(request)
return JSONResponse(