From 9715c0106eda5c9082aa6f5d56087ea3ef94a10f Mon Sep 17 00:00:00 2001 From: Boris Arzentar Date: Wed, 24 Sep 2025 10:49:40 +0200 Subject: [PATCH] fix: add env variable for changing frontend app url --- .env.template | 9 ++++++++- cognee/api/client.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.env.template b/.env.template index ddcd41a6c..f3168e6e2 100644 --- a/.env.template +++ b/.env.template @@ -176,7 +176,14 @@ ENABLE_BACKEND_ACCESS_CONTROL=False # Cognee Cloud API settings for syncing data to/from cloud infrastructure COGNEE_CLOUD_API_URL="http://localhost:8001" -COGNEE_CLOUD_AUTH_TOKEN="your-auth-token" +COGNEE_CLOUD_AUTH_TOKEN="your-api-key" + +################################################################################ +# UI Settings +################################################################################ + +# URL where the frontend is served, defaults to http://localhost:3000 +UI_APP_URL=http://localhost:3000 ################################################################################ # 🛠️ DEV Settings diff --git a/cognee/api/client.py b/cognee/api/client.py index 7d5f48672..5fec00c85 100644 --- a/cognee/api/client.py +++ b/cognee/api/client.py @@ -81,7 +81,7 @@ if CORS_ALLOWED_ORIGINS: ] else: allowed_origins = [ - "http://localhost:3000", + os.getenv("UI_APP_URL", "http://localhost:3000"), ] # Block all except explicitly set origins app.add_middleware(