From 574d1aa36a01e8d70c7d118510742c800967decf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E8=B4=A4=E6=B6=9B?= <601803023@qq.com> Date: Thu, 23 Jan 2025 15:47:07 +0800 Subject: [PATCH] fix: Path concatenation issue for authentication requests in Envoy authentication mode (#1709) --- plugins/wasm-go/extensions/ext-auth/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/wasm-go/extensions/ext-auth/main.go b/plugins/wasm-go/extensions/ext-auth/main.go index eee610f49..8cc8c0595 100644 --- a/plugins/wasm-go/extensions/ext-auth/main.go +++ b/plugins/wasm-go/extensions/ext-auth/main.go @@ -16,7 +16,7 @@ package main import ( "net/http" - "net/url" + "path" "ext-auth/config" "ext-auth/util" @@ -91,7 +91,7 @@ func checkExtAuth(ctx wrapper.HttpContext, cfg config.ExtAuthConfig, body []byte requestPath := httpServiceConfig.Path if httpServiceConfig.EndpointMode == config.EndpointModeEnvoy { requestMethod = ctx.Method() - requestPath, _ = url.JoinPath(httpServiceConfig.PathPrefix, ctx.Path()) + requestPath = path.Join(httpServiceConfig.PathPrefix, ctx.Path()) } // Call ext auth server