feat: add self-hosted SearXNG research mode
CI / compose (push) Successful in 13m39s

This commit is contained in:
Marco0300
2026-09-03 21:49:02 +02:00
parent 0f70674b16
commit d298a98723
11 changed files with 175 additions and 42 deletions
+1 -1
View File
@@ -496,7 +496,7 @@ class ApiHandler(BaseHTTPRequestHandler):
except Exception: old = {}
for name in ("nous_api_key", "firecrawl_api_key"):
if name not in credentials and name in old: credentials[name] = old[name]
if config["enabled"] and any(name not in credentials for name in ("nous_api_key", "firecrawl_api_key")):
if config["enabled"] and ("nous_api_key" not in credentials or ("SEARXNG_BASE_URL" not in os.environ and "firecrawl_api_key" not in credentials)):
return self.send_json(400, {"error": "provider_credentials_required"})
ciphertext = encrypt_provider_secret(json.dumps(credentials, sort_keys=True)) if credentials else ""
fingerprint = hashlib.sha256(json.dumps(credentials, sort_keys=True).encode()).hexdigest() if credentials else ""