Skip to content

Commit

Permalink
fix: check same domain failure (#2073)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Nov 21, 2024
1 parent f7bf99f commit df94eff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/controller/apigateway/api_gateway_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df94eff

Please sign in to comment.