From 519e93678f4cd6e935f67f16c15a23b3bf6d7270 Mon Sep 17 00:00:00 2001 From: Timmy Date: Thu, 22 Jan 2026 09:38:48 +0800 Subject: [PATCH] fix: ensure upstream scheme is set only if not already defined in HTTP route translation (#2691) (cherry picked from commit c48e9b3fb8d269b04b440c6fc5ed6880c05456f3) --- internal/adc/translator/httproute.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/adc/translator/httproute.go b/internal/adc/translator/httproute.go index a4e7e64f..4acabd31 100644 --- a/internal/adc/translator/httproute.go +++ b/internal/adc/translator/httproute.go @@ -572,7 +572,9 @@ func (t *Translator) TranslateHTTPRoute(tctx *provider.TranslateContext, httpRou t.AttachBackendTrafficPolicyToUpstream(backend.BackendRef, tctx.BackendTrafficPolicies, upstream) upstream.Nodes = upNodes - upstream.Scheme = appProtocolToUpstreamScheme(protocol) + if upstream.Scheme == "" { + upstream.Scheme = appProtocolToUpstreamScheme(protocol) + } var ( kind string port int32