From fda1252d0e92c2011a4a17219ce6f3c1e1069b5d Mon Sep 17 00:00:00 2001 From: xream Date: Thu, 20 Feb 2025 22:24:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Egern=20http=20?= =?UTF-8?q?=E4=BC=A0=E8=BE=93=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/core/proxy-utils/producers/egern.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/src/core/proxy-utils/producers/egern.js b/backend/src/core/proxy-utils/producers/egern.js index c451424..91631ac 100644 --- a/backend/src/core/proxy-utils/producers/egern.js +++ b/backend/src/core/proxy-utils/producers/egern.js @@ -218,7 +218,9 @@ export default function Egern_Producer() { proxy.transport = { http1: { method: proxy['http-opts']?.method, - path: proxy['http-opts']?.path, + path: Array.isArray(proxy['http-opts']?.path) + ? proxy['http-opts']?.path[0] + : proxy['http-opts']?.path, headers: { Host: Array.isArray( proxy['http-opts']?.headers?.Host, @@ -233,7 +235,9 @@ export default function Egern_Producer() { proxy.transport = { http2: { method: proxy['h2-opts']?.method, - path: proxy['h2-opts']?.path, + path: Array.isArray(proxy['h2-opts']?.path) + ? proxy['h2-opts']?.path[0] + : proxy['h2-opts']?.path, headers: { Host: Array.isArray( proxy['h2-opts']?.headers?.Host, @@ -291,7 +295,9 @@ export default function Egern_Producer() { proxy.transport = { http: { method: proxy['http-opts']?.method, - path: proxy['http-opts']?.path, + path: Array.isArray(proxy['http-opts']?.path) + ? proxy['http-opts']?.path[0] + : proxy['http-opts']?.path, headers: { Host: Array.isArray( proxy['http-opts']?.headers?.Host,