Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: support cors env (#1188)
Shubham Naike1f25a2b9129
diff --git a/letta/settings.py b/letta/settings.pyindex 2a2148466..08088f461 100644--- a/letta/settings.py+++ b/letta/settings.py@@ -1,3 +1,4 @@+import osfrom pathlib import Pathfrom typing import Optional@@ -116,13 +117,20 @@ class ModelSettings(BaseSettings):disable_schema_generation: bool = False-cors_origins = [- "http://letta.localhost",- "http://localhost:8283",- "http://localhost:8083",- "http://localhost:3000",- "http://localhost:4200",-]+env_cors_origins = os.getenv("ACCEPTABLE_ORIGINS")++cors_origins = (+ [+ "http://letta.localhost",+ "http://localhost:8283",+ "http://localhost:8083",+ "http://localhost:3000",+ "http://localhost:4200",+ ]+ + [env_cors_origins]+ if env_cors_origins+ else []+)# read pg_uri from ~/.letta/pg_uri or set to none, this is to support Letta Desktopdefault_pg_uri = None