feat: make SearXNG URL an environment variable

This commit is contained in:
Michael
2026-06-30 22:28:19 +02:00
parent fd85758e3c
commit 9ec05cb2fb
2 changed files with 9 additions and 4 deletions
+5 -4
View File
@@ -21,6 +21,8 @@ from typing import Any
import httpx
from gitea.config import SEARXNG_URL
logger: logging.Logger = logging.getLogger("research-tools")
_DEFAULT_TIMEOUT: int = 20
@@ -29,10 +31,9 @@ _USER_AGENT: str = (
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
)
# SearXNG instance — override with SEARXNG_URL env var
_SEARXNG_URL: str = os.getenv(
"SEARXNG_URL", "https://searxng.meeks.freeddns.org"
)
# SearXNG instance
_SEARXNG_URL: str = SEARXNG_URL
class ResearchTools: