Skip to content

Commit

Permalink
fix: update tcpRoute name is failure (#2001)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Nov 12, 2024
1 parent e3dca71 commit 9081fd2
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 @@ -303,8 +303,9 @@ func (g Struct) CreateTCPRoute(w http.ResponseWriter, r *http.Request) {
}

serviceName := apisixRouteStream.Backend.ServiceName
name := fmt.Sprintf("%s-%s", serviceName, strings.ToLower(apisixRouteStream.Protocol))
name := serviceName
if r.URL.Query().Get("port") != "" {
name := fmt.Sprintf("%s-%s", serviceName, strings.ToLower(apisixRouteStream.Protocol))
name = name + "-" + r.URL.Query().Get("port")
}
logrus.Infof("apisixRouteStream.Match.IngressPort is %v", apisixRouteStream.Match.IngressPort)
Expand Down

0 comments on commit 9081fd2

Please sign in to comment.