From 34909878613a1a3489bcef87be3469618702bfc2 Mon Sep 17 00:00:00 2001 From: huabing zhao Date: Tue, 26 Mar 2024 11:06:53 +0800 Subject: [PATCH] fix: set path prefix for http ext auth service Signed-off-by: huabing zhao --- internal/xds/translator/extauth.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/xds/translator/extauth.go b/internal/xds/translator/extauth.go index 102497633e09..9720ffb341de 100644 --- a/internal/xds/translator/extauth.go +++ b/internal/xds/translator/extauth.go @@ -147,9 +147,13 @@ func httpService(http *ir.HTTPExtAuthService) *extauthv3.HttpService { var ( uri string headersToBackend []*matcherv3.StringMatcher - service = new(extauthv3.HttpService) + service *extauthv3.HttpService ) + service = &extauthv3.HttpService{ + PathPrefix: http.Path, + } + u := url.URL{ // scheme should be decided by the TLS setting, but we don't have that info now. // It's safe to set it to http because the ext auth filter doesn't use the