Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: asgi credentials reflection (#10107)

Dylan Madisetti654c4ac0fdc6
diff --git a/marimo/_server/main.py b/marimo/_server/main.py
index fa903cd819..20702dbdcb 100644
--- a/marimo/_server/main.py
+++ b/marimo/_server/main.py
@@ -75,6 +75,9 @@ def create_starlette_app(
]
)
+ # Do not reflect credentials for wildcard origins.
+ allow_credentials = "*" not in allow_origins
+
final_middlewares.extend(
[
Middleware(OpenTelemetryMiddleware),
@@ -86,7 +89,7 @@ def create_starlette_app(
Middleware(
CORSMiddleware,
allow_origins=allow_origins,
- allow_credentials=True,
+ allow_credentials=allow_credentials,
allow_methods=["*"],
allow_headers=["*"],
),