Zheaoli commented on a change in pull request #4980:
URL: https://github.com/apache/apisix/pull/4980#discussion_r703188711
##########
File path: apisix/stream/router/ip_port.lua
##########
@@ -71,6 +96,20 @@ do
end
local route = item.value
+
+ if not item.value.remote_addr_matcher and item.value.remote_addr
then
+ local ip = create_matcher(item.value.remote_addr)
+ if ip then
Review comment:
I think it's unnecessary to use `validate_cidr_or_ip` here, we just need
to check the `remote_addr` and `server_addr` is nil or not. the `ipmatcher`
will help to validate the address when create a new match object by using `new`
method
--
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]