kingluo commented on code in PR #9534:
URL: https://github.com/apache/apisix/pull/9534#discussion_r1205310582


##########
apisix/http/route.lua:
##########
@@ -31,6 +31,23 @@ local loadstring = loadstring
 local _M = {}
 
 
+function _M.prefix_uris(route, service)
+    if service and service.value.path_prefix then
+        local uri, uris
+        if route.value.uris then
+            uris = core.table.new(#route.value.uris)
+            for _, uri in ipairs(route.value.uris) do
+                core.table.insert(uris, service.value.path_prefix .. uri)

Review Comment:
   That depends on the validation requirements.
   Not only the trailing slash, the slash, and other invalid chars may exist in 
any position of the string. So if we need real validation, we need to define 
its requirement.
   That is, is it enough if I just remove the trailing slash if exists?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to