LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
Add the WEB_APP_ORIGIN_URL in to the cors (#1207)
Ritwik G72f5d75f34a1
diff --git a/backend/backend/settings/base.py b/backend/backend/settings/base.pyindex 9e0ae7e2a..188f82647 100644--- a/backend/backend/settings/base.py+++ b/backend/backend/settings/base.py@@ -58,6 +58,7 @@ WORKFLOW_ACTION_EXPIRATION_TIME_IN_SECOND = os.environ.get("WORKFLOW_ACTION_EXPIRATION_TIME_IN_SECOND", 10800)WEB_APP_ORIGIN_URL = os.environ.get("WEB_APP_ORIGIN_URL", "http://localhost:3000")+CORS_ALLOWED_ORIGINS = [WEB_APP_ORIGIN_URL]LOGIN_NEXT_URL = os.environ.get("LOGIN_NEXT_URL", "http://localhost:3000/org")LANDING_URL = os.environ.get("LANDING_URL", "http://localhost:3000/landing")diff --git a/backend/backend/settings/dev.py b/backend/backend/settings/dev.pyindex 8765cd234..5a0b81650 100644--- a/backend/backend/settings/dev.py+++ b/backend/backend/settings/dev.py@@ -1,27 +1,19 @@-from backend.settings.base import * # noqa: F401, F403+from backend.settings.base import * # noqa: F403DEBUG = TrueX_FRAME_OPTIONS = "http://localhost:3000"X_FRAME_OPTIONS = "ALLOW-FROM http://localhost:3000"-CORS_ALLOWED_ORIGINS = [+# Ensure it's defined before modifying+try:+ CORS_ALLOWED_ORIGINS # noqa: F405+except NameError:+ CORS_ALLOWED_ORIGINS = [] # Define it if not present+# Add to the CORS_ALLOWED_ORIGINS from base+CORS_ALLOWED_ORIGINS = CORS_ALLOWED_ORIGINS + ["http://localhost:3000","http://127.0.0.1:3000","http://frontend.unstract.localhost",# Other allowed origins if needed]--CORS_ORIGIN_WHITELIST = [- "http://localhost:3000",- "http://127.0.0.1:3000",- "http://frontend.unstract.localhost",- # Other allowed origins if needed-]--CORS_ALLOW_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]--CORS_ALLOW_HEADERS = [- "authorization",- "content-type",-]