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: only set HSTS header for actual HTTPS requests

LearningCircuitedabbef046a0
diff --git a/src/local_deep_research/security/security_headers.py b/src/local_deep_research/security/security_headers.py
index a372afc595..520fbc05ae 100644
--- a/src/local_deep_research/security/security_headers.py
+++ b/src/local_deep_research/security/security_headers.py
@@ -171,10 +171,8 @@ class SecurityHeaders:
response.headers["Referrer-Policy"] = "strict-origin-when-cross-origin"
# HSTS - enforce HTTPS connections (only when using HTTPS)
- if (
- request.is_secure
- or self.app.config.get("PREFERRED_URL_SCHEME") == "https"
- ):
+ # Only set HSTS for actual HTTPS requests, not based on preferred scheme
+ if request.is_secure:
# max-age=31536000 is 1 year, includeSubDomains applies to all subdomains
response.headers["Strict-Transport-Security"] = (
"max-age=31536000; includeSubDomains"