Merge pull request #462 from octo-patch/fix/searxsearch-init-and-api-port

fix: use BACKEND_PORT env var in uvicorn and honor base_url arg in searxSearch
This commit is contained in:
Martin
2026-04-11 16:40:09 +02:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -299,4 +299,4 @@ if __name__ == "__main__":
port = int(envport)
else:
port = 7777
uvicorn.run(api, host="0.0.0.0", port=7777)
uvicorn.run(api, host="0.0.0.0", port=port)
+2 -1
View File
@@ -1,5 +1,6 @@
import requests
from bs4 import BeautifulSoup
import sys
import os
if __name__ == "__main__": # if running as a script for individual testing
@@ -16,7 +17,7 @@ class searxSearch(Tools):
self.tag = "web_search"
self.name = "searxSearch"
self.description = "A tool for searching a SearxNG for web search"
self.base_url = os.getenv("SEARXNG_BASE_URL") # Requires a SearxNG base URL
self.base_url = base_url or os.getenv("SEARXNG_BASE_URL") # Requires a SearxNG base URL
self.user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
self.paywall_keywords = [
"Member-only", "access denied", "restricted content", "404", "this page is not working"