chore: allow app.letta.com access to local if user grants permission (#1830)

Co-authored-by: Shubham Naik <shub@memgpt.ai>
This commit is contained in:
Shubham Naik
2024-10-04 16:45:04 -07:00
committed by GitHub
parent c04e5dbd9a
commit 8fc504cb9f
3 changed files with 9 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
import json
import logging
import sys
from pathlib import Path
from typing import Optional
@@ -71,6 +72,10 @@ def create_application() -> "FastAPI":
summary="Create LLM agents with long-term memory and custom tools 📚🦙",
version="1.0.0", # TODO wire this up to the version in the package
)
if "--ade" in sys.argv:
settings.cors_origins.append("https://app.letta.com")
app.add_middleware(
CORSMiddleware,
allow_origins=settings.cors_origins,