jiangfucheng opened a new issue #71:
URL: https://github.com/apache/apisix-go-plugin-runner/issues/71


   ### Issue description
   I want test apisix-go-plugin-runner whether can be used, it can be intercept 
by plugin when i used admin API create the Router, but it's not work when i 
create the Router by dashboard.
   
   adminAPI request used apisix-go-plugin-runner docs example
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
     "uri": "/get",
     "plugins": {
       "ext-plugin-pre-req": {
         "conf": [
           { "name": "say", "value":"{\"body\":\"hello\"}"}
         ]
       }
     },
     "upstream": {
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:1980": 1
           }
       }
   }
   '
   ```
   
   The following is used for the configuration of the dashboard
   ```
   {
     "uri": "/*",
     "name": "nginx-test",
     "desc": "nginx-test",
     "methods": [
       "GET",
       "POST",
       "PUT",
       "DELETE",
       "PATCH",
       "HEAD",
       "OPTIONS",
       "CONNECT",
       "TRACE"
     ],
     "plugins": {
       "ext-plugin-pre-req": {
         "disable": true,
         "name": "say",
         "value": "{\"body\":\"hello\"}"
       }
     },
     "upstream_id": "398094286752580298",
     "status": 1
   }
   ```
   upstream configuration
   ```
   {
     "nodes": [
       {
         "host": "10.60.104.20",
         "port": 9081,
         "weight": 1
       },
       {
         "host": "10.60.104.20",
         "port": 9082,
         "weight": 1
       }
     ],
     "timeout": {
       "connect": 6,
       "send": 6,
       "read": 6
     },
     "type": "roundrobin",
     "scheme": "http",
     "pass_host": "pass",
     "name": "nginx-test",
     "desc": "nginx-test",
     "keepalive_pool": {
       "idle_timeout": 60,
       "requests": 1000,
       "size": 320
     }
   }
   ```
   
   ### Environment
   
   * APISIX Go Plugin Runner's version:  latest-ade2e90-go1.16.2
   * APISIX version: 2.10.1-alpine
   * Go version: go version go1.16.2 linux/amd64
   * OS (cmd: `uname -a`): Linux f4b1f70a0825 5.10.47-linuxkit #1 SMP Sat Jul 3 
21:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux (use docker-compose deployed)
   


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