bin-53 opened a new issue, #9904:
URL: https://github.com/apache/apisix/issues/9904

   ### Description
   
   When I set up a public-api plugin in a normal route, the route goes back 
directly to the 404
   
   my steps:
   1.set route config:
   ```
   {
       "id": "471122704460677830",
       "create_time": 1690340614,
       "update_time": 1690348433,
       "uri": "/apisixtest/*",
       "name": "apisix_test",
       "priority": 12,
       "methods": [
           "GET",
           "POST",
           "PUT",
           "DELETE",
           "PATCH",
           "HEAD",
           "OPTIONS"
       ],
       "plugins": {
           "proxy-rewrite": {
               "regex_uri": [
                   "^/apisixtest(/|$)(.*)",
                   "/$2"
               ]
           }
       },
       "upstream": {
           "nodes": [
               {
                   "host": "192.168.88.66",
                   "port": 9081,
                   "weight": 1
               }
           ],
           "retries": 2,
           "timeout": {
               "connect": 6,
               "send": 6,
               "read": 6
           },
           "type": "roundrobin",
           "scheme": "http",
           "pass_host": "pass",
           "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
           },
           "retry_timeout": 2
       },
       "status": 1
   }
   ```
   Normal access:
   
![image](https://github.com/apache/apisix/assets/131146587/e32543d4-6fcb-4016-9a49-281dcc54832b)
   2.update the route ,add the public-api:
   ```
   {
       "id": "471122704460677830",
       "create_time": 1690340614,
       "update_time": 1690348814,
       "uri": "/apisixtest/*",
       "name": "apisix_test",
       "priority": 12,
       "methods": [
           "GET",
           "POST",
           "PUT",
           "DELETE",
           "PATCH",
           "HEAD",
           "OPTIONS"
       ],
       "plugins": {
           "proxy-rewrite": {
               "regex_uri": [
                   "^/apisixtest(/|$)(.*)",
                   "/$2"
               ]
           },
           "public-api": {
               "disable": false,
               "url": "/apisix/plugin/jwt/sign"
           }
       },
       "upstream": {
           "nodes": [
               {
                   "host": "192.168.88.66",
                   "port": 9081,
                   "weight": 1
               }
           ],
           "retries": 2,
           "timeout": {
               "connect": 6,
               "send": 6,
               "read": 6
           },
           "type": "roundrobin",
           "scheme": "http",
           "pass_host": "pass",
           "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
           },
           "retry_timeout": 2
       },
       "status": 1
   }
   ```
   
![image](https://github.com/apache/apisix/assets/131146587/40064953-765f-438e-b59c-ed9f66527f8c)
   
   Where is the problem, is it the wrong way to use it?
   
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.15
   - 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