From 9194ffa6b7feaf6d178de818f583ef65e2aafe61 Mon Sep 17 00:00:00 2001 From: Chingfeng Li Date: Mon, 20 Oct 2025 11:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=B7=B2=E7=BB=8F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BA=86auth=5Fkey=EF=BC=8C=E5=88=99=E4=B8=8D?= =?UTF-8?q?=E4=BD=BF=E7=94=A8uuid=E7=94=9F=E6=88=90=EF=BC=9B=20=E9=80=82?= =?UTF-8?q?=E9=85=8D=E5=8D=95=E6=A8=A1=E5=9D=97=E5=90=AF=E5=8A=A8=EF=BC=8C?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=AF=8F=E6=AC=A1=E6=9C=8D=E5=8A=A1=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E8=AE=BE=E5=A4=87=E9=83=BD=E6=97=A0=E6=B3=95=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/xiaozhi-server/app.py b/main/xiaozhi-server/app.py index 0edb475b..48ca8c9c 100644 --- a/main/xiaozhi-server/app.py +++ b/main/xiaozhi-server/app.py @@ -51,8 +51,9 @@ async def main(): # auth_key用于jwt认证,比如视觉分析接口的jwt认证 auth_key = config.get("manager-api", {}).get("secret", "") if not auth_key or len(auth_key) == 0 or "你" in auth_key: - auth_key = str(uuid.uuid4().hex) - config["server"]["auth_key"] = auth_key + if not config["server"]["auth_key"]: + auth_key = str(uuid.uuid4().hex) + config["server"]["auth_key"] = auth_key # 添加 stdin 监控任务 stdin_task = asyncio.create_task(monitor_stdin())