tzssangglass commented on code in PR #8219:
URL: https://github.com/apache/apisix/pull/8219#discussion_r1014949174


##########
apisix/admin/stream_routes.lua:
##########
@@ -16,15 +16,36 @@
 --
 local core = require("apisix.core")
 local utils = require("apisix.admin.utils")
+local config_util = require("apisix.core.config_util")
+local routes = require("apisix.stream.router.ip_port").routes
 local stream_route_checker = 
require("apisix.stream.router.ip_port").stream_route_checker
 local tostring = tostring
+local string = string
+local table = table
 
 
 local _M = {
     version = 0.1,
     need_v3_filter = true,
 }
 
+local function check_router_refer(items, id)
+    local refer_list = {}
+    for _, item in config_util.iterate_values(items) do
+        if item.value == nil then
+            goto CONTINUE
+        end
+        local r_id = string.gsub(item["key"], "/", "_")

Review Comment:
   can we replace `string.gsub` with `ngx.re.gsub`?



-- 
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