fix: RAG Worker 认证头从 Authorization:Bearer 改为 x-internal-api-key
This commit is contained in:
parent
05cf369bee
commit
87317e0dbc
@ -1,10 +1,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import httpx
|
||||
from config import API_BASE_URL, RAG_WORKER_SECRET, WORKER_ID
|
||||
from config import API_BASE_URL, INTERNAL_API_KEY, WORKER_ID
|
||||
|
||||
_auth_headers = {
|
||||
"Authorization": f"Bearer {RAG_WORKER_SECRET}",
|
||||
"x-internal-api-key": INTERNAL_API_KEY,
|
||||
"X-Worker-Id": WORKER_ID,
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ if _dotenv_path.exists():
|
||||
|
||||
# NestJS 内部 API
|
||||
API_BASE_URL = os.getenv("API_BASE_URL", "http://127.0.0.1:3000")
|
||||
RAG_WORKER_SECRET = os.getenv("RAG_WORKER_SECRET", "")
|
||||
INTERNAL_API_KEY = os.getenv("INTERNAL_API_KEY", os.getenv("RAG_WORKER_SECRET", ""))
|
||||
|
||||
# SiliconFlow
|
||||
SILICONFLOW_API_KEY = os.getenv("SILICONFLOW_API_KEY", "")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user