fix: RAG Worker 认证头从 Authorization:Bearer 改为 x-internal-api-key
All checks were successful
Deploy API Server / build-and-unit (push) Successful in 39s
Deploy API Server / current-integration (push) Successful in 32s
Deploy API Server / backward-compat (push) Successful in 0s
Deploy API Server / deploy (push) Successful in 1m6s

This commit is contained in:
wangdl 2026-06-27 12:54:59 +08:00
parent 05cf369bee
commit 87317e0dbc
2 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
from __future__ import annotations from __future__ import annotations
import httpx 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 = { _auth_headers = {
"Authorization": f"Bearer {RAG_WORKER_SECRET}", "x-internal-api-key": INTERNAL_API_KEY,
"X-Worker-Id": WORKER_ID, "X-Worker-Id": WORKER_ID,
} }

View File

@ -12,7 +12,7 @@ if _dotenv_path.exists():
# NestJS 内部 API # NestJS 内部 API
API_BASE_URL = os.getenv("API_BASE_URL", "http://127.0.0.1:3000") 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
SILICONFLOW_API_KEY = os.getenv("SILICONFLOW_API_KEY", "") SILICONFLOW_API_KEY = os.getenv("SILICONFLOW_API_KEY", "")