diff --git a/letta/settings.py b/letta/settings.py index 08088f46..f5c67d77 100644 --- a/letta/settings.py +++ b/letta/settings.py @@ -119,18 +119,17 @@ class ModelSettings(BaseSettings): 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 [] -) +cors_origins = [ + "http://letta.localhost", + "http://localhost:8283", + "http://localhost:8083", + "http://localhost:3000", + "http://localhost:4200", +] + +# attach the env_cors_origins to the cors_origins if it exists +if env_cors_origins: + cors_origins.extend(env_cors_origins.split(",")) # read pg_uri from ~/.letta/pg_uri or set to none, this is to support Letta Desktop default_pg_uri = None