From df94eff3e73d028a89cdb6cd525bd8b7ce4c9bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=AF=E8=88=AA?= <101104760+ZhangSetSail@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:47:14 +0800 Subject: [PATCH] fix: check same domain failure (#2073) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com> --- api/controller/apigateway/api_gateway_route.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/controller/apigateway/api_gateway_route.go b/api/controller/apigateway/api_gateway_route.go index 0e39d523f..1d8cea772 100644 --- a/api/controller/apigateway/api_gateway_route.go +++ b/api/controller/apigateway/api_gateway_route.go @@ -219,7 +219,8 @@ func (g Struct) CreateHTTPAPIRoute(w http.ResponseWriter, r *http.Request) { httputil.ReturnBcodeError(r, w, bcode.ErrRouteNotFound) return } - if roueList != nil && len(roueList.Items) > 0 && roueList.Items[0].Name != name && !defaultDomain { + + if roueList != nil && len(roueList.Items) > 0 && r.URL.Query().Get("appID")+roueList.Items[0].Name != name && !defaultDomain { logrus.Errorf("list check route failure: %v", err) httputil.ReturnBcodeError(r, w, bcode.ErrRouteExist) return