spacewander commented on code in PR #6988:
URL: https://github.com/apache/apisix/pull/6988#discussion_r871943884


##########
apisix/plugins/real-ip.lua:
##########
@@ -67,6 +75,22 @@ function _M.check_schema(conf)
 end
 
 
+local function addr_match(conf, addr)
+    if not conf.trusted_addresses then
+        return false
+    end
+
+    local matcher, err = lrucache(conf.trusted_addresses, nil,
+                                  core.ip.create_ip_matcher, 
conf.trusted_addresses)

Review Comment:
   Better to use 
https://github.com/apache/apisix/blob/4690feb421779f5b79e8dd990dc00f4d3f1052d0/apisix/core/lrucache.lua#L171
 instead.



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