thor533 opened a new issue, #9202:
URL: https://github.com/apache/apisix/issues/9202

   ### Current Behavior
   
   I set the plug-in execution priority, base-auth and ip-restriction according 
to the documents, but the Settings are invalid and the base-auth plug-in is 
executed first
   
   the route config is :
   {
   "id": "453027477904687809",
   "create_time": 1679555018,
   "update_time": 1679989160,
   "uri": "/xubin/",
   "name": "检查测试",
   "priority": 1,
   "methods": [
   "GET",
   "POST",
   "PUT",
   "DELETE",
   "PATCH",
   "HEAD",
   "OPTIONS",
   "CONNECT",
   "TRACE"
   ],
   "plugins": {
   "basic-auth": {
   "_meta": {
   "priority": -2000
   },
   "disable": false
   },
   "ip-restriction": {
   "_meta": {
   "priority": 10000
   },
   "disable": false,
   "whitelist": [
   "113.74.26.106/24"
   ]
   },
   "proxy-rewrite": {
   "regex_uri": [
   "^/xubin(/|$)(.)",
   "/$2"
   ]
   }
   },
   "upstream": {
   "nodes": [
   {
   "host": "192.168.88.66",
   "port": 9001,
   "weight": 1
   }
   ],
   "retries": 15,
   "timeout": {
   "connect": 1,
   "send": 1,
   "read": 9
   },
   "type": "roundrobin",
   "scheme": "http",
   "pass_host": "pass",
   "keepalive_pool": {
   "idle_timeout": 60,
   "requests": 1000,
   "size": 320
   },
   "retry_timeout": 10
   },
   "labels": {
   "1": "1"
   },
   "status": 1
   }
   
   ### Expected Behavior
   
   the ip-restriction is executed first
   
   
   
   ### Error Logs
   
   no error
   
   ### Steps to Reproduce
   
   I've only configured the basic-auth and ip-restriction plug-ins, and they 
both work, but I want ip-restriction to work first. I've configured the 
parameters according to the documentation, "_meta": {"priority": 100}, but the 
basic-auth is executed first,
   My route configuration is as follows:
   
   {
   "id": "453027477904687809",
   "create_time": 1679555018,
   "update_time": 1679999874,
   "uri": "/xubin/",
   "name": "测试测试22",
   "priority": 1,
   "methods": [
   "GET",
   "POST",
   "PUT",
   "DELETE",
   "PATCH",
   "HEAD",
   "OPTIONS",
   "CONNECT",
   "TRACE"
   ],
   "plugins": {
   "basic-auth": {
   "_meta": {
   "priority": 2
   },
   "disable": true
   },
   "ip-restriction": {
   "_meta": {
   "priority": 100
   },
   "disable": false,
   "whitelist": [
   "192.168.88.61"
   ]
   },
   "proxy-rewrite": {
   "regex_uri": [
   "^/xubin(/|$)(.)",
   "/$2"
   ]
   }
   },
   "upstream": {
   "nodes": [
   {
   "host": "192.168.88.66",
   "port": 9001,
   "weight": 1
   }
   ],
   "retries": 15,
   "timeout": {
   "connect": 1,
   "send": 1,
   "read": 9
   },
   "type": "roundrobin",
   "scheme": "http",
   "pass_host": "pass",
   "keepalive_pool": {
   "idle_timeout": 60,
   "requests": 1000,
   "size": 320
   },
   "retry_timeout": 10
   },
   "labels": {
   "1": "1"
   },
   "status": 1
   }
   
   
   ### Environment
   
   - APISIX version (run `apisix 2.15-alpine`):
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


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