This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a1d46240 The dss prod label interface forwarding problem was fixed. 
(#4746)
2a1d46240 is described below

commit 2a1d4624084e8cf62ff9283d0e304cc95fcdab48
Author: ahaoyao <[email protected]>
AuthorDate: Fri Jul 7 15:07:22 2023 +0800

    The dss prod label interface forwarding problem was fixed. (#4746)
---
 .../scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/src/main/scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala
 
b/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/src/main/scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala
index bdf8dfbe5..5fbe7b20d 100644
--- 
a/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/src/main/scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala
+++ 
b/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/src/main/scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala
@@ -238,8 +238,10 @@ class DSSGatewayParser extends AbstractGatewayParser {
         retService
       }
     }
-    val lowerServiceId = parsedServiceId.toLowerCase(Locale.getDefault())
+    var lowerServiceId = parsedServiceId.toLowerCase(Locale.getDefault())
     val serverName = tmpServerName.toLowerCase(Locale.getDefault())
+    // 让prod的接口匹配到prod的服务
+    if (serverName.endsWith("-prod")) lowerServiceId += "/prod"
     findIt(_.toLowerCase(Locale.getDefault()) == 
serverName).orElse(findMostCorrect(service => {
       (service, lowerServiceId.split("/").count(word => 
service.contains(word)))
     }))


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to