kwanhur commented on code in PR #7049:
URL: https://github.com/apache/apisix/pull/7049#discussion_r878233290


##########
t/cli/test_admin.sh:
##########
@@ -112,6 +112,48 @@ if [ $count -eq 0 ]; then
     exit 1
 fi
 
+echo "

Review Comment:
   Added case value `10.0.0.1`.
   
   The branch `if yaml_conf.apisix.enable_admin and not checked_admin_key then` 
seems be out of range changed feature from `if allow_ip == "127.0.0.0/24" then` 
to `if _ip and _ip:is_loopback() then`.
   
   I think the new test case should cover `if _ip and _ip:is_loopback() then`, 
like the value `all` `10.0.0.1` `127.0.0.9` `127.0.0.1/8` `::1` `::1/128`, 
these cases are `non-IP address` `non-loopback` `IPv4 loopback address` `IPv4 
loopback CIDR` `IPv6 loopback address` `IPv6 loopback CIDR`.
   
   Maybe I'm confused now.



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to