~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
fix: skip middleware for health check endpoint (#3032)
LearningCircuit5a16dee0e643
diff --git a/src/local_deep_research/web/auth/middleware_optimizer.py b/src/local_deep_research/web/auth/middleware_optimizer.pyindex 6e15c2b996..d4b04aa8ef 100644--- a/src/local_deep_research/web/auth/middleware_optimizer.py+++ b/src/local_deep_research/web/auth/middleware_optimizer.py@@ -17,7 +17,7 @@ def should_skip_database_middleware():return True# Skip for favicon, robots.txt, etc- if path in ["/favicon.ico", "/robots.txt", "/health"]:+ if path in ["/favicon.ico", "/robots.txt", "/api/v1/health"]:return True# Skip for Socket.IO polling/websocketdiff --git a/tests/web/auth/test_middleware_optimizer.py b/tests/web/auth/test_middleware_optimizer.pyindex f3c3ea91ab..dcca8d471f 100644--- a/tests/web/auth/test_middleware_optimizer.py+++ b/tests/web/auth/test_middleware_optimizer.py@@ -69,8 +69,8 @@ class TestShouldSkipDatabaseMiddleware:assert should_skip_database_middleware() is Truedef test_skip_health(self, app):- """Should skip /health endpoint."""- with app.test_request_context("/health", method="GET"):+ """Should skip /api/v1/health endpoint."""+ with app.test_request_context("/api/v1/health", method="GET"):assert should_skip_database_middleware() is True# -- Socket.IO paths --------------------------------------------------@@ -173,7 +173,7 @@ class TestShouldSkipQueueChecks:def test_skip_health_post(self, app):"""Health endpoint is skipped even for POST."""- with app.test_request_context("/health", method="POST"):+ with app.test_request_context("/api/v1/health", method="POST"):assert should_skip_queue_checks() is Truedef test_skip_socket_io_post(self, app):@@ -248,7 +248,7 @@ class TestShouldSkipSessionCleanup:def test_skip_health_even_when_random_returns_1(self, app):"""Health endpoint should skip cleanup even when random returns 1."""- with app.test_request_context("/health", method="GET"):+ with app.test_request_context("/api/v1/health", method="GET"):with patch("random.randint", return_value=1):assert should_skip_session_cleanup() is True