From 0de4170ee73b5dbe636785c659a265e223c2e800 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Mar 2026 14:39:20 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=20CORS=20=E5=A4=B4?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=B3=A8=E9=87=8A=E8=AF=B4=E6=98=8E=EF=BC=88?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=AE=A1=E6=9F=A5=E5=8F=8D=E9=A6=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- backend-integration/api-proxy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend-integration/api-proxy.js b/backend-integration/api-proxy.js index 71ed0581..85aa6600 100644 --- a/backend-integration/api-proxy.js +++ b/backend-integration/api-proxy.js @@ -735,7 +735,9 @@ function proxyToPersonaStudio(req, res, fullPath) { }; const proxyReq = http.request(options, (proxyRes) => { - // Forward status and headers (preserve CORS headers already set) + // Forward status and headers, but skip backend's CORS headers + // because the api-proxy already set CORS headers via setCorsHeaders() + // at the top of the request handler — forwarding both would cause duplicates const headers = {}; for (const [key, value] of Object.entries(proxyRes.headers)) { if (!key.startsWith('access-control-')) {