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


##########
t/cli/test_admin.sh:
##########
@@ -112,6 +113,67 @@ if [ $count -eq 0 ]; then
     exit 1
 fi
 
+echo "
+apisix:
+    enable_admin: true
+    allow_admin:
+        - 127.0.0.0/8
+" > conf/config.yaml
+
+make init
+
+count=`grep -c "allow 127.0.0.0/8" conf/nginx.conf`
+if [ $count -eq 0 ]; then
+    echo "failed: not found 'allow 127.0.0.0/8;' in conf/nginx.conf"
+    exit 1
+fi
+
+echo "
+apisix:
+    enable_admin: true
+    allow_admin:
+        - ::1

Review Comment:
   To make some confirmation, the not relative is that `allow_admin` should be 
limited on which option?
   
   1. Option A `IPv4 address` and `IPv4 CIDR`, the others are not relative.
   2. Option B `IPv6 address` and `IPv6 CIDR` are not relative, the others are 
ok.
   3. Option C `all` is not relative.
   
   [allow](https://nginx.org/en/docs/http/ngx_http_access_module.html#allow) 
(ngx_http_access_module)
   
   ```
   Syntax: | allow address | CIDR | unix: | all;
   ```



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