From 729c7d86dc4053bd200307db101a09b6331f9cda Mon Sep 17 00:00:00 2001 From: Pine Date: Tue, 25 Aug 2026 16:32:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(opc):=20=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E6=A0=87=E8=AE=B0=20X-Client:desktop(=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E9=9B=B6=E6=8E=A8=E6=96=AD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 所有 API 请求带 X-Client:desktop, server-core /auth 据此识别 source=desktop --- console/src/api/authHeaders.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/console/src/api/authHeaders.ts b/console/src/api/authHeaders.ts index d6134df..14a4481 100644 --- a/console/src/api/authHeaders.ts +++ b/console/src/api/authHeaders.ts @@ -4,6 +4,8 @@ import { useAuthStore } from "../auth/authStore"; /** Authorization + X-Agent-Id + X-Port-Id for API requests. Caller sets Content-Type when needed. */ export function buildAuthHeaders(): Record { const headers: Record = {}; + // 客户端来源:server-core /auth 据此识别用户来源(desktop)→source,零推断 + headers["X-Client"] = "desktop"; const token = getApiToken(); if (token) { headers.Authorization = `Bearer ${token}`;