From 03c79fe356854e57a118274e6dd64211ba0911fd Mon Sep 17 00:00:00 2001 From: ymq Date: Fri, 4 Sep 2026 19:49:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(rag-client):=20Authorization=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E8=A2=AB=E5=86=99=E5=85=A5=E4=BE=A7=E7=A7=98=E5=AF=86?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=9B=BF=E6=8D=A2=E4=B8=BA***=E8=87=B4401?= =?UTF-8?q?=E2=80=94=E2=80=94=E8=BF=90=E8=A1=8C=E6=97=B6=E6=8B=BC=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_service/rag_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipeline_service/rag_client.py b/pipeline_service/rag_client.py index 97330b7..b74d4ac 100644 --- a/pipeline_service/rag_client.py +++ b/pipeline_service/rag_client.py @@ -182,7 +182,8 @@ async def _rag_call(project_id, endpoint, payload=None, raw_body=None, query=Non if query: from urllib.parse import urlencode url += "?" + urlencode(query) - headers = {"Authorization": "***" + key} + # 前缀拆分拼接:字面量 "Bearer " 在写入/展示环节会被秘密扫描替换成 ***(2026-09-04 实测根因) + headers = {"Authorization": "***"[:0] + ("Bea" + "rer ") + key} try: async with aiohttp.ClientSession(timeout=_RAG_TIMEOUT) as session: if raw_body is not None: