Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: relax CORS origin validation for backward compatibility

LearningCircuitb38a58006326
diff --git a/src/local_deep_research/security/security_headers.py b/src/local_deep_research/security/security_headers.py
index 46763f5b4b..312def92bd 100644
--- a/src/local_deep_research/security/security_headers.py
+++ b/src/local_deep_research/security/security_headers.py
@@ -259,6 +259,9 @@ class SecurityHeaders:
# If wildcard, allow all origins
if configured_origins == "*":
origin_to_send = "*"
+ # If request has no Origin header, use configured origin (backward compatibility)
+ elif not request_origin:
+ origin_to_send = configured_origins
# If multiple origins configured (comma-separated), use origin reflection
elif "," in configured_origins:
# Parse configured origins into a set
@@ -267,7 +270,7 @@ class SecurityHeaders:
}
# Reflect the request origin if it's in the whitelist
- if request_origin and request_origin in allowed_origins_set:
+ if request_origin in allowed_origins_set:
origin_to_send = request_origin
else:
# Request origin not in whitelist - deny by not setting CORS headers
@@ -279,7 +282,7 @@ class SecurityHeaders:
# Single origin configured - validate request origin matches
else:
# For single origin, verify request origin matches before setting CORS headers
- if request_origin and request_origin != configured_origins:
+ if request_origin != configured_origins:
logger.warning(
f"CORS request from non-matching origin: {request_origin}. "
f"Configured origin: {configured_origins}"