fix: use BACKEND_PORT env var in uvicorn and honor base_url arg in searxSearch

- api.py: uvicorn.run was hardcoding port=7777 instead of using the
  port variable populated from BACKEND_PORT env var, making BACKEND_PORT
  ineffective when running python api.py directly
- searxSearch: add missing 'import sys' (caused NameError when run as
  standalone script) and use constructor base_url arg with env var
  fallback so searxSearch(base_url=...) actually takes effect
This commit is contained in:
Octopus
2026-04-06 10:43:16 +08:00
parent 31205febfe
commit 3fc2ac5235
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)